Class SegmentsRecord.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<SegmentsRecord.Builder>
co.elastic.clients.elasticsearch.cat.segments.SegmentsRecord.Builder
- All Implemented Interfaces:
WithJson<SegmentsRecord.Builder>
,ObjectBuilder<SegmentsRecord>
- Enclosing class:
- SegmentsRecord
public static class SegmentsRecord.Builder
extends WithJsonObjectBuilderBase<SegmentsRecord.Builder>
implements ObjectBuilder<SegmentsRecord>
Builder for
SegmentsRecord
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aSegmentsRecord
.final SegmentsRecord.Builder
Iftrue
, the segment is synced to disk.final SegmentsRecord.Builder
Iftrue
, the segment is stored in a compound file.final SegmentsRecord.Builder
The number of documents in the segment.final SegmentsRecord.Builder
docsDeleted
(String value) The number of deleted documents in the segment, which might be higher or lower than the number of delete operations you have performed.final SegmentsRecord.Builder
generation
(String value) The segment generation number.final SegmentsRecord.Builder
The unique identifier of the node where it lives.final SegmentsRecord.Builder
The index name.final SegmentsRecord.Builder
The IP address of the node where it lives.final SegmentsRecord.Builder
The shard type:primary
orreplica
.final SegmentsRecord.Builder
searchable
(String value) Iftrue
, the segment is searchable.final SegmentsRecord.Builder
The segment name, which is derived from the segment generation and used internally to create file names in the directory of the shard.protected SegmentsRecord.Builder
self()
final SegmentsRecord.Builder
The shard name.final SegmentsRecord.Builder
The segment size in bytes.final SegmentsRecord.Builder
sizeMemory
(String value) The segment memory in bytes.final SegmentsRecord.Builder
The version of Lucene used to write the segment.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
index
The index name.API name:
index
-
shard
The shard name.API name:
shard
-
prirep
The shard type:primary
orreplica
.API name:
prirep
-
ip
The IP address of the node where it lives.API name:
ip
-
id
The unique identifier of the node where it lives.API name:
id
-
segment
The segment name, which is derived from the segment generation and used internally to create file names in the directory of the shard.API name:
segment
-
generation
The segment generation number. Elasticsearch increments this generation number for each segment written then uses this number to derive the segment name.API name:
generation
-
docsCount
The number of documents in the segment. 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:
docs.count
-
docsDeleted
The number of deleted documents in the segment, which might 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:
docs.deleted
-
size
The segment size in bytes.API name:
size
-
sizeMemory
The segment memory in bytes. A value of-1
indicates Elasticsearch was unable to compute this number.API name:
size.memory
-
committed
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
-
searchable
Iftrue
, the segment is searchable. Iffalse
, the segment has most likely been written to disk but needs a refresh to be searchable.API name:
searchable
-
version
The version of Lucene used to write the segment.API name:
version
-
compound
Iftrue
, the segment is stored in a compound file. This means Lucene merged all files from the segment in a single file to save file descriptors.API name:
compound
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<SegmentsRecord.Builder>
-
build
Builds aSegmentsRecord
.- Specified by:
build
in interfaceObjectBuilder<SegmentsRecord>
- Throws:
NullPointerException
- if some of the required fields are null.
-