You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/api/vectordbs/elasticsearch.adoc
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -126,10 +126,17 @@ Properties starting with the `spring.ai.vectorstore.elasticsearch.*` prefix are
126
126
127
127
|`spring.ai.vectorstore.elasticsearch.index-name` | The name of the index to store the vectors. | spring-ai-document-index
128
128
|`spring.ai.vectorstore.elasticsearch.dimensions` | The number of dimensions in the vector. | 1536
129
-
|`spring.ai.vectorstore.elasticsearch.dense-vector-indexing` | Whether to use dense vector indexing. | true
130
129
|`spring.ai.vectorstore.elasticsearch.similarity` | The similarity function to use. | `cosine`
131
130
|===
132
131
132
+
The following similarity functions are available:
133
+
134
+
* cosine
135
+
* l2_norm
136
+
* dot_product
137
+
138
+
More details about each in the https://www.elastic.co/guide/en/elasticsearch/reference/master/dense-vector.html#dense-vector-params[Elasticsearch Documentation] on dense vectors.
139
+
133
140
== Metadata Filtering
134
141
135
142
You can leverage the generic, portable xref:api/vectordbs.adoc#metadata-filters[metadata filters] with Elasticsearch as well.
@@ -205,10 +212,11 @@ Read the link:https://www.elastic.co/guide/en/elasticsearch/client/java-api-clie
Copy file name to clipboardExpand all lines: spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/vectorstore/elasticsearch/ElasticsearchVectorStoreAutoConfiguration.java
Copy file name to clipboardExpand all lines: vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchVectorStore.java
0 commit comments