23 bool hasSingleNormFile, int32_t docStoreOffset,
const String& docStoreSegment,
24 bool docStoreIsCompoundFile,
bool hasProx);
37 static const int32_t
NO;
38 static const int32_t
YES;
144 void setDocStore(int32_t offset,
const String& segment,
bool isCompoundFile);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Utility template class to handle hash set collections that can be safely copied and shared.
Definition HashSet.h:17
Base class for all Lucene classes.
Definition LuceneObject.h:31
Information about a segment such as it's name, directory, and files related to the segment.
Definition SegmentInfo.h:16
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Return clone of this object.
virtual int32_t hashCode()
Return hash code for this object.
void setDocStoreOffset(int32_t offset)
void write(const IndexOutputPtr &output)
Save this segment's info.
void advanceNormGen(int32_t fieldIndex)
Increment the generation count for the norms file for this field.
virtual bool equals(const LuceneObjectPtr &other)
We consider another SegmentInfo instance equal if it has the same dir and same name.
String name
Definition SegmentInfo.h:91
bool hasProx
Definition SegmentInfo.h:86
static const int32_t NO
Definition SegmentInfo.h:37
HashSet< String > files()
Return all files referenced by this SegmentInfo. The returns List is a locally cached List so you sho...
static const int32_t WITHOUT_GEN
Definition SegmentInfo.h:40
static const int32_t CHECK_DIR
Definition SegmentInfo.h:39
int32_t getDocStoreOffset()
SegmentInfo(const DirectoryPtr &dir, int32_t format, const IndexInputPtr &input)
Construct a new SegmentInfo instance by reading a previously saved SegmentInfo from input.
bool preLockless
Definition SegmentInfo.h:44
static const int32_t YES
Definition SegmentInfo.h:38
void setDocStore(int32_t offset, const String &segment, bool isCompoundFile)
SegmentInfo(const String &name, int32_t docCount, const DirectoryPtr &dir)
bool getDocStoreIsCompoundFile()
DirectoryPtr dir
Definition SegmentInfo.h:93
bool hasSeparateNorms()
Returns true if any fields in this segment have separate norms.
void setUseCompoundFile(bool isCompoundFile)
Mark whether this segment is stored as a compound file.
String docStoreSegment
Definition SegmentInfo.h:77
void reset(const SegmentInfoPtr &src)
Copy everything from src SegmentInfo into our instance.
void setDiagnostics(MapStringString diagnostics)
void setNumFields(int32_t numFields)
int64_t sizeInBytes()
Returns total size in bytes of all of files used by this segment.
int32_t docStoreOffset
Definition SegmentInfo.h:74
bool hasSeparateNorms(int32_t fieldNumber)
Returns true if this field for this segment has saved a separate norms file (_<segment>_N....
MapStringString diagnostics
Definition SegmentInfo.h:88
void setHasProx(bool hasProx)
void setDocStoreIsCompoundFile(bool v)
HashSet< String > _files
Definition SegmentInfo.h:67
uint8_t isCompoundFile
Definition SegmentInfo.h:59
SegmentInfo(const String &name, int32_t docCount, const DirectoryPtr &dir, bool isCompoundFile, bool hasSingleNormFile, int32_t docStoreOffset, const String &docStoreSegment, bool docStoreIsCompoundFile, bool hasProx)
bool hasSingleNormFile
Definition SegmentInfo.h:64
MapStringString getDiagnostics()
void addIfExists(HashSet< String > files, const String &fileName)
bool getUseCompoundFile()
Returns true if this segment is stored as a compound file; else, false.
int32_t docCount
Definition SegmentInfo.h:92
int64_t delGen
Definition SegmentInfo.h:48
SegmentInfo(const String &name, int32_t docCount, const DirectoryPtr &dir, bool isCompoundFile, bool hasSingleNormFile)
void setDelCount(int32_t delCount)
String getNormFileName(int32_t number)
Get the file name for the norms file for this field.
String segString(const DirectoryPtr &dir)
Used for debugging.
String getDocStoreSegment()
void clearFiles()
Called whenever any change is made that affects which files this segment has.
int32_t delCount
Definition SegmentInfo.h:83
bool docStoreIsCompoundFile
Definition SegmentInfo.h:80
int64_t _sizeInBytes
Definition SegmentInfo.h:70
Collection< int64_t > normGen
Definition SegmentInfo.h:55
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
boost::shared_ptr< SegmentInfo > SegmentInfoPtr
Definition LuceneTypes.h:208
boost::shared_ptr< IndexInput > IndexInputPtr
Definition LuceneTypes.h:493
boost::shared_ptr< Directory > DirectoryPtr
Definition LuceneTypes.h:489
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition LuceneTypes.h:494