00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef XAPIAN_INCLUDED_COMPACTOR_H
00024 #define XAPIAN_INCLUDED_COMPACTOR_H
00025
00026 #include <xapian/base.h>
00027 #include <xapian/visibility.h>
00028 #include <string>
00029
00030 namespace Xapian {
00031
00034 class XAPIAN_VISIBILITY_DEFAULT Compactor {
00035 public:
00037 class Internal;
00038
00039 typedef enum { STANDARD, FULL, FULLER } compaction_level;
00040
00041 private:
00043 Xapian::Internal::RefCntPtr<Internal> internal;
00044
00045 public:
00046 Compactor();
00047
00048 virtual ~Compactor();
00049
00057 void set_block_size(size_t block_size);
00058
00071 void set_renumber(bool renumber);
00072
00080 void set_multipass(bool multipass);
00081
00090 void set_compaction_level(compaction_level compaction);
00091
00100 void set_destdir(const std::string & destdir);
00101
00106 void add_source(const std::string & srcdir);
00107
00109 void compact();
00110
00122 virtual void
00123 set_status(const std::string & table, const std::string & status);
00124
00142 virtual std::string
00143 resolve_duplicate_metadata(const std::string & key,
00144 size_t num_tags, const std::string tags[]);
00145 };
00146
00147 }
00148
00149 #endif