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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DocFieldProcessorPerThread.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 DOCFIELDPROCESSORPERTHREAD_H
8 #define DOCFIELDPROCESSORPERTHREAD_H
9 
10 #include "DocConsumerPerThread.h"
11 #include "DocumentsWriter.h"
12 
13 namespace Lucene
14 {
20  {
21  public:
24 
26 
27  public:
28  double docBoost;
29  int32_t fieldGen;
33  Collection<DocFieldProcessorPerFieldPtr> _fields; // Holds all fields seen in current doc
34  int32_t fieldCount;
35 
36  Collection<DocFieldProcessorPerFieldPtr> fieldHash; // Hash table for all fields ever seen
37  int32_t hashMask;
38  int32_t totalFieldCount;
39 
42 
44  int32_t freeCount;
45  int32_t allocCount;
46 
47  public:
48  virtual void initialize();
49  virtual void abort();
51 
52  // If there are fields we've seen but did not see again in the last run, then free them up.
53  void trimFields(SegmentWriteStatePtr state);
54 
55  virtual DocWriterPtr processDocument();
56 
59 
60  protected:
61  void rehash();
62  };
63 
65  {
66  public:
69 
71 
72  public:
75 
76  protected:
78 
79  public:
80  virtual int64_t sizeInBytes();
81  virtual void finish();
82  virtual void abort();
83  };
84 }
85 
86 #endif

clucene.sourceforge.net