nit0906 commented on code in PR #2099:
URL: https://github.com/apache/jackrabbit-oak/pull/2099#discussion_r1977007038


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticPropertyDefinition.java:
##########
@@ -50,6 +61,14 @@ public 
ElasticPropertyDefinition(IndexDefinition.IndexingRule idxDefn, String no
                     getOptionalValue(defn, PROP_CANDIDATES, 
DEFAULT_CANDIDATES));
         }
         this.useInFullTextQuery = this.dynamicBoost && getOptionalValue(defn, 
PROP_USE_IN_FULL_TEXT_QUERY, true);
+        boolean flattened = getOptionalValue(defn, PROP_IS_FLATTENED, 
PROP_IS_FLATTENED_DEFAULT);
+        if (analyzed) {
+            // if analyzed is enabled, then flattened needs to be disabled,
+            // because flattened types do not support fulltext queries

Review Comment:
   should we also add `nodeScopeIndex` to this exception ? As per the oak docs 
   
   ```
   nodeScopeIndex
   Control whether the value of a property should be part of fulltext index. 
That is, you can do a jcr:contains(., 'foo') and it will return nodes that have 
a string property that contains the word foo. Example
   /jcr:root/content//element(*, app:Asset)[jcr:contains(., 'image')]
   
   ```



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