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 
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 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 public:
19  virtual ~TermVectorsTermsWriter();
20 
22 
23 public:
27  int32_t freeCount;
31  int32_t lastDocID;
32  int32_t allocCount;
33 
34 public:
36  virtual void createPostings(Collection<RawPostingListPtr> postings, int32_t start, int32_t count);
37  virtual void flush(MapTermsHashConsumerPerThreadCollectionTermsHashConsumerPerField threadsAndFields, const SegmentWriteStatePtr& state);
38  virtual void closeDocStore(const SegmentWriteStatePtr& state);
39 
41 
43  void fill(int32_t docID);
44 
45  void initTermVectorsWriter();
47  bool freeRAM();
48  void free(const TermVectorsTermsWriterPerDocPtr& doc);
49 
50  virtual void abort();
51  virtual int32_t bytesPerPosting();
52 };
53 
55 public:
58 
60 
61 protected:
63 
64 public:
67  int32_t numVectorFields;
68 
71 
72 public:
73  void reset();
74  virtual void abort();
75  void addField(int32_t fieldNumber);
76  virtual int64_t sizeInBytes();
77  virtual void finish();
78 };
79 
81 public:
84 
86 
87 public:
88  int32_t freq; // How many times this term occurred in the current doc
89  int32_t lastOffset; // Last offset we saw
90  int32_t lastPosition; // Last position where this term occurred
91 };
92 
93 }
94 
95 #endif

clucene.sourceforge.net