Class Segment.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<Segment.Builder>
co.elastic.clients.elasticsearch.indices.segments.Segment.Builder
- All Implemented Interfaces:
WithJson<Segment.Builder>,ObjectBuilder<Segment>
- Enclosing class:
- Segment
public static class Segment.Builder
extends WithJsonObjectBuilderBase<Segment.Builder>
implements ObjectBuilder<Segment>
Builder for
Segment.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Segment.Builderattributes(String key, String value) Required - Contains information about whether high compression was enabled and per-field vector formats.final Segment.Builderattributes(Map<String, String> map) Required - Contains information about whether high compression was enabled and per-field vector formats.build()Builds aSegment.final Segment.Buildercommitted(boolean value) Required - Iftrue, the segment is synced to disk.final Segment.Buildercompound(boolean value) Required - Iftrue, Lucene merged all files from the segment into a single file to save file descriptors.final Segment.BuilderdeletedDocs(long value) 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.final Segment.Buildergeneration(int value) Required - Generation number, such as0.final Segment.BuildernumDocs(long value) Required - The number of documents as reported by Lucene.final Segment.Buildersearch(boolean value) Required - Iftrue, the segment is searchable.protected Segment.Builderself()final Segment.BuildersizeInBytes(double value) Required - Disk space used by the segment, in bytes.final Segment.BuilderRequired - Version of Lucene used to write the segment.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
attributes
Required - Contains information about whether high compression was enabled and per-field vector formats.API name:
attributesAdds all entries of
maptoattributes. -
attributes
Required - Contains information about whether high compression was enabled and per-field vector formats.API name:
attributesAdds an entry to
attributes. -
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
Required - Iftrue, Lucene merged all files from the segment into a single file to save file descriptors.API name:
compound -
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
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
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
Required - Disk space used by the segment, in bytes.API name:
size_in_bytes -
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 -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<Segment.Builder>
-
build
Builds aSegment.- Specified by:
buildin interfaceObjectBuilder<Segment>- Throws:
NullPointerException- if some of the required fields are null.
-