public final class

SegmentInfo

extends Object
java.lang.Object
   ↳ org.apache.lucene.index.SegmentInfo

Class Overview

Information about a segment such as it's name, directory, and files related to the segment. *

NOTE: This API is new and still experimental (subject to change suddenly in the next release)

Summary

Fields
public Directory dir
public int docCount
public String name
Public Constructors
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)
Public Methods
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<StringString> 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()
boolean hasSeparateNorms(int fieldNumber)
Returns true if this field for this segment has saved a separate norms file (__N.sX).
boolean hasSeparateNorms()
Returns true if any fields in this segment have separate norms.
int hashCode()
String segString(Directory dir)
Used for debugging
long sizeInBytes()
Returns total size in bytes of all of files used by this segment.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public Directory dir

public int docCount

public String name

Public Constructors

public SegmentInfo (String name, int docCount, Directory dir)

public SegmentInfo (String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile)

public SegmentInfo (String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, int docStoreOffset, String docStoreSegment, boolean docStoreIsCompoundFile, boolean hasProx)

Public Methods

public Object clone ()

public boolean equals (Object obj)

We consider another SegmentInfo instance equal if it has the same dir and same name.

public List<String> files ()

Throws
IOException

public int getDelCount ()

Throws
IOException

public String getDelFileName ()

public Map<StringString> getDiagnostics ()

public boolean getDocStoreIsCompoundFile ()

public int getDocStoreOffset ()

public String getDocStoreSegment ()

public boolean getHasProx ()

public String getNormFileName (int number)

Get the file name for the norms file for this field.

Parameters
number field index
Throws
IOException

public boolean getUseCompoundFile ()

Returns true if this segment is stored as a compound file; else, false.

Throws
IOException

public boolean hasDeletions ()

Throws
IOException

public boolean hasSeparateNorms (int fieldNumber)

Returns true if this field for this segment has saved a separate norms file (__N.sX).

Parameters
fieldNumber the field index to check
Throws
IOException

public boolean hasSeparateNorms ()

Returns true if any fields in this segment have separate norms.

Throws
IOException

public int hashCode ()

public String segString (Directory dir)

Used for debugging

public long sizeInBytes ()

Returns total size in bytes of all of files used by this segment.

Throws
IOException

public String toString ()