Class ElasticsearchEmbeddingStore

java.lang.Object
dev.langchain4j.store.embedding.elasticsearch.ElasticsearchEmbeddingStore
All Implemented Interfaces:
EmbeddingStore<TextSegment>

public class ElasticsearchEmbeddingStore extends Object implements EmbeddingStore<TextSegment>
Represents an Elasticsearch index as an embedding store.
See Also:
  • Constructor Details

    • ElasticsearchEmbeddingStore

      @Deprecated(forRemoval=true) public ElasticsearchEmbeddingStore(ElasticsearchConfiguration configuration, String serverUrl, String apiKey, String userName, String password, String indexName, Integer dimension)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an instance of ElasticsearchEmbeddingStore.
      Parameters:
      configuration - Elasticsearch configuration to use (Knn or Script)
      serverUrl - Elasticsearch Server URL (mandatory)
      apiKey - Elasticsearch API key (optional)
      userName - Elasticsearch userName (optional)
      password - Elasticsearch password (optional)
      indexName - Elasticsearch index name (optional). Default value: "default". Index will be created automatically if not exists.
      dimension - Embedding vector dimension (mandatory when index does not exist yet).
    • ElasticsearchEmbeddingStore

      @Deprecated(forRemoval=true) public ElasticsearchEmbeddingStore(ElasticsearchConfiguration configuration, String serverUrl, String apiKey, String userName, String password, String indexName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an instance of ElasticsearchEmbeddingStore.
      Parameters:
      configuration - Elasticsearch configuration to use (Knn or Script)
      serverUrl - Elasticsearch Server URL (mandatory)
      apiKey - Elasticsearch API key (optional)
      userName - Elasticsearch userName (optional)
      password - Elasticsearch password (optional)
      indexName - Elasticsearch index name (optional). Default value: "default". Index will be created automatically if not exists.
    • ElasticsearchEmbeddingStore

      public ElasticsearchEmbeddingStore(ElasticsearchConfiguration configuration, org.elasticsearch.client.RestClient restClient, String indexName)
      Constructor using a RestClient
      Parameters:
      configuration - Elasticsearch configuration to use (Knn or Script)
      restClient - Elasticsearch Rest Client (mandatory)
      indexName - Elasticsearch index name (optional). Default value: "default". Index will be created automatically if not exists.
  • Method Details