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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MergeDocIDRemapper.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 MERGEDOCIDREMAPPER_H
8 #define MERGEDOCIDREMAPPER_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
17 class MergeDocIDRemapper : public LuceneObject
18 {
19 public:
20 MergeDocIDRemapper(SegmentInfosPtr infos, Collection< Collection<int32_t> > docMaps, Collection<int32_t> delCounts, OneMergePtr merge, int32_t mergedDocCount);
21 virtual ~MergeDocIDRemapper();
22
23 LUCENE_CLASS(MergeDocIDRemapper);
24
25 public:
26 Collection<int32_t> starts; // used for binary search of mapped docID
27 Collection<int32_t> newStarts; // starts, minus the deletes
28 Collection< Collection<int32_t> > docMaps; // maps docIDs in the merged set
29 int32_t minDocID; // minimum docID that needs renumbering
30 int32_t maxDocID; // 1+ the max docID that needs renumbering
31 int32_t docShift; // total # deleted docs that were compacted by this merge
32
33 public:
34 int32_t remap(int32_t oldDocID);
35 };
36 }
37
38 #endif

clucene.sourceforge.net