Package org.elasticsearch.index.engine
Class Segment
- java.lang.Object
-
- org.elasticsearch.index.engine.Segment
-
- All Implemented Interfaces:
Streamable
public class Segment extends java.lang.Object implements Streamable
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<java.lang.String,java.lang.String>
attributes
boolean
committed
java.lang.Boolean
compound
int
delDocCount
int
docCount
long
memoryInBytes
java.lang.String
mergeId
org.apache.lucene.util.Accountable
ramTree
boolean
search
org.apache.lucene.search.Sort
segmentSort
long
sizeInBytes
org.apache.lucene.util.Version
version
-
Constructor Summary
Constructors Constructor Description Segment(java.lang.String name)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Map<java.lang.String,java.lang.String>
getAttributes()
Return segment attributes.int
getDeletedDocs()
long
getGeneration()
long
getMemoryInBytes()
Estimation of the memory usage used by a segment.java.lang.String
getMergeId()
If set, a string representing that the segment is part of a merge, with the value representing the group of segments that represent this merge.java.lang.String
getName()
int
getNumDocs()
org.apache.lucene.search.Sort
getSegmentSort()
Return the sort order of this segment, or null if the segment has no sort.ByteSizeValue
getSize()
long
getSizeInBytes()
org.apache.lucene.util.Version
getVersion()
int
hashCode()
boolean
isCommitted()
java.lang.Boolean
isCompound()
boolean
isSearch()
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.static Segment
readSegment(StreamInput in)
java.lang.String
toString()
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
-
-
-
Field Detail
-
committed
public boolean committed
-
search
public boolean search
-
sizeInBytes
public long sizeInBytes
-
docCount
public int docCount
-
delDocCount
public int delDocCount
-
version
public org.apache.lucene.util.Version version
-
compound
public java.lang.Boolean compound
-
mergeId
public java.lang.String mergeId
-
memoryInBytes
public long memoryInBytes
-
segmentSort
public org.apache.lucene.search.Sort segmentSort
-
ramTree
public org.apache.lucene.util.Accountable ramTree
-
attributes
public java.util.Map<java.lang.String,java.lang.String> attributes
-
-
Method Detail
-
getName
public java.lang.String getName()
-
getGeneration
public long getGeneration()
-
isCommitted
public boolean isCommitted()
-
isSearch
public boolean isSearch()
-
getNumDocs
public int getNumDocs()
-
getDeletedDocs
public int getDeletedDocs()
-
getSize
public ByteSizeValue getSize()
-
getSizeInBytes
public long getSizeInBytes()
-
getVersion
public org.apache.lucene.util.Version getVersion()
-
isCompound
@Nullable public java.lang.Boolean isCompound()
-
getMergeId
@Nullable public java.lang.String getMergeId()
If set, a string representing that the segment is part of a merge, with the value representing the group of segments that represent this merge.
-
getMemoryInBytes
public long getMemoryInBytes()
Estimation of the memory usage used by a segment.
-
getSegmentSort
public org.apache.lucene.search.Sort getSegmentSort()
Return the sort order of this segment, or null if the segment has no sort.
-
getAttributes
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Return segment attributes.- See Also:
SegmentInfo.getAttributes()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
readSegment
public static Segment readSegment(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-