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

Loading...
Searching...
No Matches
LogByteSizeMergePolicy.h
Go to the documentation of this file.
1
2// 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
LogMergePolicy.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
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::LogByteSizeMergePolicy::LogByteSizeMergePolicy
LogByteSizeMergePolicy(const IndexWriterPtr &writer)
Lucene::LogByteSizeMergePolicy::DEFAULT_MIN_MERGE_MB
static const double DEFAULT_MIN_MERGE_MB
Default minimum segment size.
Definition LogByteSizeMergePolicy.h:25
Lucene::LogByteSizeMergePolicy::~LogByteSizeMergePolicy
virtual ~LogByteSizeMergePolicy()
Lucene::LogByteSizeMergePolicy::setMinMergeMB
void setMinMergeMB(double mb)
Sets the minimum size for the lowest level segments. Any segments below this size are considered to b...
Lucene::LogByteSizeMergePolicy::getMinMergeMB
double getMinMergeMB()
Get the minimum size for a segment to remain un-merged.
Lucene::LogByteSizeMergePolicy::setMaxMergeMB
void setMaxMergeMB(double mb)
Determines the largest segment (measured by total byte size of the segment's files,...
Lucene::LogByteSizeMergePolicy::size
virtual int64_t size(const SegmentInfoPtr &info)
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::LogByteSizeMergePolicy::getMaxMergeMB
double getMaxMergeMB()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be m...
Lucene::LogMergePolicy
This class implements a MergePolicy that tries to merge segments into levels of exponentially increas...
Definition LogMergePolicy.h:24
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::SegmentInfoPtr
boost::shared_ptr< SegmentInfo > SegmentInfoPtr
Definition LuceneTypes.h:208
Lucene::IndexWriterPtr
boost::shared_ptr< IndexWriter > IndexWriterPtr
Definition LuceneTypes.h:160

clucene.sourceforge.net