alagodasii commented on code in PR #1646:
URL: https://github.com/apache/jackrabbit-oak/pull/1646#discussion_r1721308678


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java:
##########
@@ -191,8 +193,6 @@ public BoolQuery.Builder baseQueryBuilder() {
                     } else {
                         bqb.must(m -> m.moreLikeThis(mltQuery(mltParams)));
                     }
-                } else {
-                    bqb.must(m -> m.bool(similarityQuery(queryNodePath, sp)));

Review Comment:
   I tried to add `knn` as part of base bool query, but following error is 
printed: 
   `Corresponding ES query Query: 
{"bool":{"filter":[{"exists":{"field":"sim:fv"}}],"should":[{"knn":{"field":"sim:fv","query_vector":[0.1166586503386497...
 :: ES Response ErrorCause: 
{"type":"x_content_parse_exception","reason":"[1:125] [bool] failed to parse 
field 
[should]","caused_by":{"type":"illegal_argument_exception","reason":"[knn] 
queries cannot be provided directly, use the [knn] body parameter 
instead"},"root_cause":[{"type":"x_content_parse_exception","reason":"[1:125] 
[bool] failed to parse field [should]"}]} : closing scanner, notifying 
listeners`
   Using wrapper for base64-encoded kin query string also results in error. Any 
hint?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to