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: backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/dialect/impl/ElasticsearchDialectFactory.java
Copy file name to clipboardexpand all lines: backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/dialect/model/impl/Elasticsearch8ModelDialect.java
Copy file name to clipboardexpand all lines: backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/search/predicate/impl/ElasticsearchKnnPredicate.java
+65
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,19 @@ public KnnPredicateBuilder create(ElasticsearchSearchIndexScope<?> scope,
Copy file name to clipboardexpand all lines: backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/types/dsl/provider/impl/Elasticsearch8IndexFieldTypeFactoryProvider.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
importcom.google.gson.Gson;
13
13
14
14
/**
15
-
* The index field type factory provider for ES8.x.
15
+
* The index field type factory provider for ES [8.0-8.11].
Copy file name to clipboardexpand all lines: backend/elasticsearch/src/test/java/org/hibernate/search/backend/elasticsearch/dialect/impl/ElasticsearchDialectFactoryTest.java
Copy file name to clipboardexpand all lines: documentation/src/main/asciidoc/public/reference/_search-dsl-predicate.adoc
+4-2
Original file line number
Diff line number
Diff line change
@@ -1578,7 +1578,7 @@ While when an <<backend-elasticsearch-compatibility-opensearch,OpenSearch>> dist
1578
1578
when the index is configured to have more than one shard.
1579
1579
See this section of the OpenSearch link:{openSearchDocUrl}/search-plugins/knn/approximate-knn/#get-started-with-approximate-k-nn[documentation] for more details.
1580
1580
1581
-
With the Elasticsearch backend and when using <<backend-elasticsearch-compatibility-elasticsearch,Elasticsearch>>,
1581
+
With the Elasticsearch backend and when using <<backend-elasticsearch-compatibility-elasticsearch,Elasticsearch>> version < 8.12,
1582
1582
a `knn` predicate can only be added as a top-level predicate,
1583
1583
i.e. a predicate directly passed to a where clause of a search query,
1584
1584
or as part of a top-level disjunction,
@@ -1588,7 +1588,9 @@ A `knn` predicate can be combined with other predicate types by adding them thro
1588
1588
Any other usages of a `knn` predicate, with this backend, would lead to an exception being thrown.
1589
1589
See this section of the Elasticsearch link:{elasticsearchDocUrl}/knn-search.html#_combine_approximate_knn_with_other_features[documentation]
1590
1590
in particular to learn more about how Elasticsearch combines regular queries with knn.
1591
-
<<backend-elasticsearch-compatibility-opensearch,OpenSearch>> does not have these limitation.
1591
+
For Elasticsearch 8.12+ a knn predicate is converted to a link:{elasticsearchDocUrl}/query-dsl-knn-query.html#query-dsl-knn-query[knn-query]
1592
+
removing the limitations described for earlier versions.
1593
+
<<backend-elasticsearch-compatibility-opensearch,OpenSearch>> also does not have these limitation.
1592
1594
1593
1595
.Multiple `knn` predicates added via `should` clauses
Copy file name to clipboardexpand all lines: integrationtest/backend/elasticsearch/src/test/java/org/hibernate/search/integrationtest/backend/elasticsearch/testsupport/util/ElasticsearchTckBackendFeatures.java
+4-4
Original file line number
Diff line number
Diff line change
@@ -250,16 +250,16 @@ public boolean supportsExplicitRefresh() {
0 commit comments