public final class SegmentInfo extends Object
NOTE: This API is new and still experimental (subject to change suddenly in the next release)
Constructor and Description |
---|
SegmentInfo(String name,
int docCount,
Directory dir) |
SegmentInfo(String name,
int docCount,
Directory dir,
boolean isCompoundFile,
boolean hasSingleNormFile) |
SegmentInfo(String name,
int docCount,
Directory dir,
boolean isCompoundFile,
boolean hasSingleNormFile,
int docStoreOffset,
String docStoreSegment,
boolean docStoreIsCompoundFile,
boolean hasProx) |
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 |
files() |
int |
getDelCount() |
String |
getDelFileName() |
Map |
getDiagnostics() |
boolean |
getDocStoreIsCompoundFile() |
int |
getDocStoreOffset() |
String |
getDocStoreSegment() |
boolean |
getHasProx() |
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.
|
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 (_
|
String |
segString(Directory dir)
Used for debugging
|
long |
sizeInBytes()
Returns total size in bytes of all of files used by
this segment.
|
String |
toString() |
public SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile)
public Map getDiagnostics()
public long sizeInBytes() throws IOException
IOException
public boolean hasDeletions() throws IOException
IOException
public String getDelFileName()
public boolean hasSeparateNorms(int fieldNumber) throws IOException
fieldNumber
- the field index to checkIOException
public boolean hasSeparateNorms() throws IOException
IOException
public String getNormFileName(int number) throws IOException
number
- field indexIOException
public boolean getUseCompoundFile() throws IOException
IOException
public int getDelCount() throws IOException
IOException
public int getDocStoreOffset()
public boolean getDocStoreIsCompoundFile()
public String getDocStoreSegment()
public boolean getHasProx()
public List files() throws IOException
IOException
public boolean equals(Object obj)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.