| Constructor and Description |
|---|
SegmentInfo(String name,
int docCount,
Directory dir,
boolean isCompoundFile,
boolean hasSingleNormFile,
boolean hasProx,
boolean hasVectors) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
equals(Object obj)
We consider another SegmentInfo instance equal if it
has the same dir and same name.
|
List<String> |
files() |
int |
getDelCount() |
String |
getDelFileName() |
Map<String,String> |
getDiagnostics() |
boolean |
getDocStoreIsCompoundFile() |
int |
getDocStoreOffset() |
String |
getDocStoreSegment() |
boolean |
getHasProx() |
boolean |
getHasVectors() |
String |
getNormFileName(int number)
Get the file name for the norms file for this field.
|
boolean |
getUseCompoundFile()
Returns true if this segment is stored as a compound
file; else, false.
|
String |
getVersion()
Returns the version of the code which wrote the segment.
|
boolean |
hasDeletions() |
int |
hashCode() |
boolean |
hasSeparateNorms()
Returns true if any fields in this segment have separate norms.
|
boolean |
hasSeparateNorms(int fieldNumber)
Returns true if this field for this segment has saved a separate norms file (_
|
void |
setDocStoreSegment(String segment) |
void |
setHasVectors(boolean v) |
long |
sizeInBytes(boolean includeDocStores)
Returns total size in bytes of all of files used by this segment (if
includeDocStores is true), or the size of all files except the store
files otherwise. |
String |
toString() |
String |
toString(Directory dir,
int pendingDelCount)
Used for debugging.
|
public long sizeInBytes(boolean includeDocStores)
throws IOException
includeDocStores is true), or the size of all files except the store
files otherwise.IOExceptionpublic boolean getHasVectors()
throws IOException
IOExceptionpublic void setHasVectors(boolean v)
public boolean hasDeletions()
throws IOException
IOExceptionpublic String getDelFileName()
public boolean hasSeparateNorms(int fieldNumber)
throws IOException
fieldNumber - the field index to checkIOExceptionpublic boolean hasSeparateNorms()
throws IOException
IOExceptionpublic String getNormFileName(int number) throws IOException
number - field indexIOExceptionpublic boolean getUseCompoundFile()
throws IOException
IOExceptionpublic int getDelCount()
throws IOException
IOExceptionpublic int getDocStoreOffset()
public boolean getDocStoreIsCompoundFile()
public String getDocStoreSegment()
public void setDocStoreSegment(String segment)
public boolean getHasProx()
public List<String> files() throws IOException
IOExceptionpublic String toString(Directory dir, int pendingDelCount)
Current format looks like
_a(3.1):c45/4->_1, which means the segment's
name is _a; it was created with Lucene 3.1 (or
'?' if it's unkown); it's using compound file
format (would be C if not compound); it
has 45 documents; it has 4 deletions (this part is
left off when there are no deletions); it's using the
shared doc stores named _1 (this part is
left off if doc stores are private).
public boolean equals(Object obj)
public String getVersion()