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

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public class Segment extends Object implements PlainJsonSerializable, ToCopyableBuilder<Segment.Builder,Segment>
The detailed information about a segment.
  • Field Details

  • Method Details

    • of

    • attributes

      @Nonnull public final Map<String,String> attributes()
      Required - The attributes of the segment.

      API name: attributes

    • committed

      public final boolean committed()
      Required - Whether the segment is committed.

      API name: committed

    • compound

      public final boolean compound()
      Required - Whether the segment is compound.

      API name: compound

    • deletedDocs

      public final int deletedDocs()
      Required - The number of deleted documents in the segment.

      API name: deleted_docs

    • generation

      public final int generation()
      Required - The generation number of the segment.

      API name: generation

    • memory

      @Nullable public final String memory()
      API name: memory
    • memoryInBytes

      @Nullable public final Long memoryInBytes()
      API name: memory_in_bytes
    • numDocs

      public final int numDocs()
      Required - The number of documents in the segment.

      API name: num_docs

    • search

      public final boolean search()
      Required - Whether the segment is searchable.

      API name: search

    • size

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

      public final long sizeInBytes()
      Required - API name: size_in_bytes
    • version

      @Nonnull public final String version()
      Required - 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 Segment.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<Segment.Builder,Segment>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static Segment.Builder builder()
    • setupSegmentDeserializer

      protected static void setupSegmentDeserializer(ObjectDeserializer<Segment.Builder> op)
    • hashCode

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

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