nit0906 commented on a change in pull request #424:
URL: https://github.com/apache/jackrabbit-oak/pull/424#discussion_r772270244



##########
File path: 
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticRequestHandler.java
##########
@@ -787,7 +787,25 @@ private static QueryBuilder fullTextQuery(String text, 
String fieldName, PlanRes
             // and could contain other parts like renditions, node name, etc
             return multiMatchQuery.field(fieldName);
         } else {
-            return 
simpleQueryStringQuery(text).field(fieldName).defaultOperator(Operator.AND);
+            // 
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
+            // simpleQueryStringQuery does not support leading wildcards 
whereas it's supported by default in queryStringQuery
+            // Not using queryStringQuery by default , since this can have 
performance impact, also some functional cases break.

Review comment:
       @thomasmueller  - thanks for pointing out. I added the details in the 
comment. Removed the performance impact bit, since that is due to 
allowingLeadingWildCards, but will impact only those queries that actually 
search on leading wildcards, but this is in line with the lucene implementation 
now.




-- 
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