Class Segment
java.lang.Object
co.elastic.clients.elasticsearch.indices.segments.Segment
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<Segment>Json deserializer forSegment -
Method Summary
Modifier and TypeMethodDescriptionRequired - Contains information about whether high compression was enabled and per-field vector formats.final booleanRequired - Iftrue, the segment is synced to disk.final booleancompound()Required - Iftrue, Lucene merged all files from the segment into a single file to save file descriptors.final longRequired - The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed.final intRequired - Generation number, such as0.final longnumDocs()Required - The number of documents as reported by Lucene.static Segmentrebuild()final booleansearch()Required - Iftrue, the segment is searchable.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal doubleRequired - Disk space used by the segment, in bytes.toString()final Stringversion()Required - Version of Lucene used to write the segment.
-
Field Details
-
_DESERIALIZER
Json deserializer forSegment
-
-
Method Details
-
of
-
attributes
Required - Contains information about whether high compression was enabled and per-field vector formats.API name:
attributes -
committed
public final boolean committed()Required - Iftrue, the segment is synced to disk. Segments that are synced can survive a hard reboot. Iffalse, the data from uncommitted segments is also stored in the transaction log so that Elasticsearch is able to replay changes on the next start.API name:
committed -
compound
public final boolean compound()Required - Iftrue, Lucene merged all files from the segment into a single file to save file descriptors.API name:
compound -
deletedDocs
public final long deletedDocs()Required - The number of deleted documents as reported by Lucene, which may be higher or lower than the number of delete operations you have performed. This number excludes deletes that were performed recently and do not yet belong to a segment. Deleted documents are cleaned up by the automatic merge process if it makes sense to do so. Also, Elasticsearch creates extra deleted documents to internally track the recent history of operations on a shard.API name:
deleted_docs -
generation
public final int generation()Required - Generation number, such as0. Elasticsearch increments this generation number for each segment written then uses this number to derive the segment name.API name:
generation -
search
public final boolean search()Required - Iftrue, the segment is searchable. Iffalse, the segment has most likely been written to disk but needs a refresh to be searchable.API name:
search -
sizeInBytes
public final double sizeInBytes()Required - Disk space used by the segment, in bytes.API name:
size_in_bytes -
numDocs
public final long numDocs()Required - The number of documents as reported by Lucene. This excludes deleted documents and counts any nested documents separately from their parents. It also excludes documents which were indexed recently and do not yet belong to a segment.API name:
num_docs -
version
Required - Version of Lucene used to write the segment.API name:
version -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
rebuild
- Returns:
- New
Segment.Builderinitialized with field values of this instance
-
setupSegmentDeserializer
-