Lucene++ - a full-featured, c++ search engine
API Documentation

LogByteSizeMergePolicy.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef LOGBYTESIZEMERGEPOLICY_H
8 #define LOGBYTESIZEMERGEPOLICY_H
9
10 #include "LogMergePolicy.h"
11
12 namespace Lucene {
13
16 class LPPAPI LogByteSizeMergePolicy : public LogMergePolicy {
17 public:
18 LogByteSizeMergePolicy(const IndexWriterPtr& writer);
19 virtual ~LogByteSizeMergePolicy();
20
21 LUCENE_CLASS(LogByteSizeMergePolicy);
22
23 public:
25 static const double DEFAULT_MIN_MERGE_MB;
26
29 static const double DEFAULT_MAX_MERGE_MB;
30
31 protected:
32 virtual int64_t size(const SegmentInfoPtr& info);
33
34 public:
42 void setMaxMergeMB(double mb);
43
46 double getMaxMergeMB();
47
53 void setMinMergeMB(double mb);
54
56 double getMinMergeMB();
57 };
58
59 }
60
61 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::SegmentInfoPtr
boost::shared_ptr< SegmentInfo > SegmentInfoPtr
Definition: LuceneTypes.h:208
Lucene::LogByteSizeMergePolicy::DEFAULT_MAX_MERGE_MB
static const double DEFAULT_MAX_MERGE_MB
Default maximum segment size. A segment of this size or larger will never be merged.
Definition: LogByteSizeMergePolicy.h:29
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LogMergePolicy
This class implements a MergePolicy that tries to merge segments into levels of exponentially increas...
Definition: LogMergePolicy.h:24
LogMergePolicy.h
Lucene::LogByteSizeMergePolicy
This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's file...
Definition: LogByteSizeMergePolicy.h:16
Lucene::IndexWriterPtr
boost::shared_ptr< IndexWriter > IndexWriterPtr
Definition: LuceneTypes.h:160

clucene.sourceforge.net