public final class SegmentInfo
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
Directory |
dir |
int |
docCount |
java.lang.String |
name |
Constructor and Description |
---|
SegmentInfo(java.lang.String name,
int docCount,
Directory dir,
boolean isCompoundFile,
boolean hasSingleNormFile,
boolean hasProx,
boolean hasVectors) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object obj)
We consider another SegmentInfo instance equal if it
has the same dir and same name.
|
java.util.List<java.lang.String> |
files() |
int |
getDelCount() |
java.lang.String |
getDelFileName() |
java.util.Map<java.lang.String,java.lang.String> |
getDiagnostics() |
boolean |
getDocStoreIsCompoundFile() |
int |
getDocStoreOffset() |
java.lang.String |
getDocStoreSegment() |
boolean |
getHasProx() |
boolean |
getHasVectors() |
java.lang.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.
|
java.lang.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(java.lang.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. |
java.lang.String |
toString() |
java.lang.String |
toString(Directory dir,
int pendingDelCount)
Used for debugging.
|
public java.lang.String name
public int docCount
public Directory dir
public SegmentInfo(java.lang.String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, boolean hasProx, boolean hasVectors)
public java.util.Map<java.lang.String,java.lang.String> getDiagnostics()
public long sizeInBytes(boolean includeDocStores) throws java.io.IOException
includeDocStores
is true), or the size of all files except the store
files otherwise.java.io.IOException
public boolean getHasVectors() throws java.io.IOException
java.io.IOException
public void setHasVectors(boolean v)
public boolean hasDeletions() throws java.io.IOException
java.io.IOException
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getDelFileName()
public boolean hasSeparateNorms(int fieldNumber) throws java.io.IOException
fieldNumber
- the field index to checkjava.io.IOException
public boolean hasSeparateNorms() throws java.io.IOException
java.io.IOException
public java.lang.String getNormFileName(int number) throws java.io.IOException
number
- field indexjava.io.IOException
public boolean getUseCompoundFile() throws java.io.IOException
java.io.IOException
public int getDelCount() throws java.io.IOException
java.io.IOException
public int getDocStoreOffset()
public boolean getDocStoreIsCompoundFile()
public java.lang.String getDocStoreSegment()
public void setDocStoreSegment(java.lang.String segment)
public boolean getHasProx()
public java.util.List<java.lang.String> files() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.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(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getVersion()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.