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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TermVectorsTermsWriter.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 TERMVECTORSTERMSWRITER_H
8 #define TERMVECTORSTERMSWRITER_H
9 
10 #include "TermsHashConsumer.h"
11 #include "DocumentsWriter.h"
12 #include "RawPostingList.h"
13 
14 namespace Lucene
15 {
17  {
18  public:
20  virtual ~TermVectorsTermsWriter();
21 
23 
24  public:
28  int32_t freeCount;
32  int32_t lastDocID;
33  int32_t allocCount;
34 
35  public:
37  virtual void createPostings(Collection<RawPostingListPtr> postings, int32_t start, int32_t count);
38  virtual void flush(MapTermsHashConsumerPerThreadCollectionTermsHashConsumerPerField threadsAndFields, SegmentWriteStatePtr state);
39  virtual void closeDocStore(SegmentWriteStatePtr state);
40 
42 
44  void fill(int32_t docID);
45 
46  void initTermVectorsWriter();
48  bool freeRAM();
50 
51  virtual void abort();
52  virtual int32_t bytesPerPosting();
53  };
54 
56  {
57  public:
60 
62 
63  protected:
65 
66  public:
69  int32_t numVectorFields;
70 
73 
74  public:
75  void reset();
76  virtual void abort();
77  void addField(int32_t fieldNumber);
78  virtual int64_t sizeInBytes();
79  virtual void finish();
80  };
81 
83  {
84  public:
87 
89 
90  public:
91  int32_t freq; // How many times this term occurred in the current doc
92  int32_t lastOffset; // Last offset we saw
93  int32_t lastPosition; // Last position where this term occurred
94  };
95 }
96 
97 #endif

clucene.sourceforge.net