Class Index

java.lang.Object
org.opensearch.core.index.Index
All Implemented Interfaces:
Writeable, ToXContent, ToXContentObject

@PublicApi(since="1.0.0") public class Index extends Object implements Writeable, ToXContentObject
A value class representing the basic required properties of an OpenSearch index.

(This class is immutable.)

Opensearch.api:
  • Field Details

  • Constructor Details

    • Index

      public Index(String name, String uuid)
      Creates a new Index instance with name and unique identifier
      Parameters:
      name - the name of the index
      uuid - the unique identifier of the index
      Throws:
      NullPointerException - if either name or uuid are null
    • Index

      public Index(StreamInput in) throws IOException
      Creates a new Index instance from a StreamInput. Reads the name and unique identifier from the stream.
      Parameters:
      in - the stream to read from
      Throws:
      IOException - if an error occurs while reading from the stream
      See Also:
  • Method Details