This version is still in development and is not considered stable yet. For the latest snapshot version, please use Spring AI 1.0.0-SNAPSHOT!spring-doc.cn

For spring-boot versions pre 3.3.0 it’s necessary to explicitly add the elasticsearch-java dependency with version > 8.13.3, otherwise the older version used will be incompatible with the queries performed:
Refer to the Dependency Management section to add the Spring AI BOM to your build file.
Refer to the Repositories section to add Milestone and/or Snapshot Repositories to your build file.
this is a breaking change! In earlier versions of Spring AI, this schema initialization happened by default.
If you choose to create a shell script for ease in future work, be sure to run it prior to starting your application by "sourcing" the file, i.e. source <your_script_name>.sh.
Property Description Default Value

spring.elasticsearch.connection-timeoutspring-doc.cn

Connection timeout used when communicating with Elasticsearch.spring-doc.cn

1sspring-doc.cn

spring.elasticsearch.passwordspring-doc.cn

Password for authentication with Elasticsearch.spring-doc.cn

-spring-doc.cn

spring.elasticsearch.usernamespring-doc.cn

Username for authentication with Elasticsearch.spring-doc.cn

-spring-doc.cn

spring.elasticsearch.urisspring-doc.cn

Comma-separated list of the Elasticsearch instances to use.spring-doc.cn

localhost:9200spring-doc.cn

spring.elasticsearch.path-prefixspring-doc.cn

Prefix added to the path of every request sent to Elasticsearch.spring-doc.cn

-spring-doc.cn

spring.elasticsearch.restclient.sniffer.delay-after-failurespring-doc.cn

Delay of a sniff execution scheduled after a failure.spring-doc.cn

1mspring-doc.cn

spring.elasticsearch.restclient.sniffer.intervalspring-doc.cn

Interval between consecutive ordinary sniff executions.spring-doc.cn

5mspring-doc.cn

spring.elasticsearch.restclient.ssl.bundlespring-doc.cn

SSL bundle name.spring-doc.cn

-spring-doc.cn

spring.elasticsearch.socket-keep-alivespring-doc.cn

Whether to enable socket keep alive between client and Elasticsearch.spring-doc.cn

falsespring-doc.cn

spring.elasticsearch.socket-timeoutspring-doc.cn

Socket timeout used when communicating with Elasticsearch.spring-doc.cn

30sspring-doc.cn

Property Description Default Value

spring.ai.vectorstore.elasticsearch.initialize-schemaspring-doc.cn

Whether to initialize the required schemaspring-doc.cn

falsespring-doc.cn

spring.ai.vectorstore.elasticsearch.index-namespring-doc.cn

The name of the index to store the vectors.spring-doc.cn

spring-ai-document-indexspring-doc.cn

spring.ai.vectorstore.elasticsearch.dimensionsspring-doc.cn

The number of dimensions in the vector.spring-doc.cn

1536spring-doc.cn

spring.ai.vectorstore.elasticsearch.similarityspring-doc.cn

The similarity function to use.spring-doc.cn

cosinespring-doc.cn

spring.ai.vectorstore.elasticsearch.initialize-schemaspring-doc.cn

whether to initialize the required schemaspring-doc.cn

falsespring-doc.cn

Those (portable) filter expressions get automatically converted into the proprietary Elasticsearch Query string query.