Interface OpenSearchDataSet<T>

Type Parameters:
T - Type of the elements to index as documents.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface OpenSearchDataSet<T>
Set of documents used to initialize an index with data.
  • Method Summary

    Modifier and Type
    Method
    Description
    Obtain the documents to index.
    default String
    Name of the field holding the document _id.
  • Method Details

    • documents

      List<T> documents()
      Obtain the documents to index.
      Returns:
      Documents to index.
    • identifier

      default String identifier()
      Name of the field holding the document _id. A field named _id is removed from the source, as OpenSearch rejects metadata fields inside a document; any other field is kept. Documents without this field get an id generated by OpenSearch.
      Returns:
      The identifier field name.