Class ElasticsearchStore.Builder

java.lang.Object
io.agentscope.core.rag.store.ElasticsearchStore.Builder
Enclosing class:
ElasticsearchStore

public static class ElasticsearchStore.Builder extends Object
Builder for ElasticsearchStore.
  • Method Details

    • url

      Sets the Elasticsearch connection URL.
      Parameters:
      url - the URL
      Returns:
      the builder
    • indexName

      public ElasticsearchStore.Builder indexName(String indexName)
      Sets the index name.
      Parameters:
      indexName - the index name
      Returns:
      the builder
    • dimensions

      public ElasticsearchStore.Builder dimensions(int dimensions)
      Sets the vector dimensions.
      Parameters:
      dimensions - the number of dimensions
      Returns:
      the builder
    • username

      public ElasticsearchStore.Builder username(String username)
      Sets the username for authentication.
      Parameters:
      username - the username
      Returns:
      the builder
    • password

      public ElasticsearchStore.Builder password(String password)
      Sets the password for authentication.
      Parameters:
      password - the password
      Returns:
      the builder
    • disableSslVerification

      public ElasticsearchStore.Builder disableSslVerification(boolean disableSslVerification)
      Sets whether to disable SSL verification.

      Warning: Disabling SSL verification is insecure and should only be used for development.

      Parameters:
      disableSslVerification - true to disable verification
      Returns:
      the builder
    • build

      Builds the ElasticsearchStore instance.
      Returns:
      the store instance
      Throws:
      VectorStoreException - if configuration is invalid