Class SegmentsRecord

java.lang.Object
org.opensearch.client.opensearch.cat.segments.SegmentsRecord
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<SegmentsRecord.Builder,SegmentsRecord>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public class SegmentsRecord extends Object implements PlainJsonSerializable, ToCopyableBuilder<SegmentsRecord.Builder,SegmentsRecord>
  • Field Details

  • Method Details

    • of

    • committed

      @Nullable public final String committed()
      If true, the segment is synced to disk. Segments that are synced can survive a hard reboot. If false, the data from uncommitted segments is also stored in the transaction log so that OpenSearch is able to replay changes on the next start.

      API name: committed

    • compound

      @Nullable public final String compound()
      If true, 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

    • docsCount

      @Nullable public final String 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

      @Nullable public final String 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, OpenSearch creates extra deleted documents to internally track the recent history of operations on a shard.

      API name: docs.deleted

    • generation

      @Nullable public final String generation()
      The segment generation number. OpenSearch increments this generation number for each segment written then uses this number to derive the segment name.

      API name: generation

    • id

      @Nullable public final String id()
      API name: id
    • index

      @Nullable public final String index()
      API name: index
    • ip

      @Nullable public final String ip()
      The IP address of the node where it lives.

      API name: ip

    • prirep

      @Nullable public final String prirep()
      The shard type: primary or replica.

      API name: prirep

    • searchable

      @Nullable public final String searchable()
      If true, the segment is searchable. If false, the segment has most likely been written to disk but needs a refresh to be searchable.

      API name: searchable

    • segment

      @Nullable public final String 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

    • shard

      @Nullable public final String shard()
      The shard name.

      API name: shard

    • size

      @Nullable public final String size()
      API name: size
    • sizeMemory

      @Nullable public final String sizeMemory()
      API name: size.memory
    • version

      @Nullable public final String version()
      API name: version
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public SegmentsRecord.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<SegmentsRecord.Builder,SegmentsRecord>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static SegmentsRecord.Builder builder()
    • setupSegmentsRecordDeserializer

      protected static void setupSegmentsRecordDeserializer(ObjectDeserializer<SegmentsRecord.Builder> op)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object