xapian-core  2.0.0
compactor.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2003-2026 Betts
5  * Copyright (C) 2008 Lemur Consulting Ltd
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, see
19  * <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef XAPIAN_INCLUDED_COMPACTOR_H
23 #define XAPIAN_INCLUDED_COMPACTOR_H
24 
25 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
26 # error Never use <xapian/compactor.h> directly; include <xapian.h> instead.
27 #endif
28 
29 #include <xapian/constants.h>
30 #include <xapian/visibility.h>
31 #include <string>
32 
33 namespace Xapian {
34 
35 class Database;
36 
40  public:
42  typedef enum {
44  STANDARD = 0,
46  FULL = 1,
52  FULLER = 2
53  } compaction_level;
54 
55  Compactor() {}
56 
57  virtual ~Compactor();
58 
70  virtual void
71  set_status(const std::string & table, const std::string & status);
72 
95  virtual std::string
96  resolve_duplicate_metadata(const std::string & key,
97  size_t num_tags, const std::string tags[]);
98 };
99 
100 }
101 
102 #endif /* XAPIAN_INCLUDED_COMPACTOR_H */
Compact a database, or merge and compact several.
Definition: compactor.h:39
Constants in the Xapian namespace.
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:82
Define XAPIAN_VISIBILITY_* macros.
#define XAPIAN_VISIBILITY_DEFAULT
Definition: visibility.h:28
static bool tags