thomasmueller commented on code in PR #2200:
URL: https://github.com/apache/jackrabbit-oak/pull/2200#discussion_r2014797135


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticDocumentMaker.java:
##########
@@ -145,11 +145,13 @@ protected void indexFulltextValue(ElasticDocument doc, 
String value) {
 
     /**
      * We store the value in :fulltext only when the {@link 
PropertyDefinition} has a regular expression (that means we
-     * were not able to create a ft property at mapping time) or the property 
is not analyzed.
+     * were not able to create a ft property at mapping time) or the property 
is not analyzed or the type could be ignored
+     * in case is malformed (eg: a date that cannot be parsed).
      */
     @Override
     protected boolean isFulltextValuePersistedAtNode(PropertyDefinition pd) {
-        return pd.isRegexp || !pd.analyzed;
+        return pd.isRegexp || !pd.analyzed ||
+                (pd.getType() == Type.DATE.tag()) || (pd.getType() == 
Type.BOOLEAN.tag() || pd.getType() == Type.LONG.tag() || pd.getType() == 
Type.DOUBLE.tag());

Review Comment:
   ```suggestion
           return pd.isRegexp || !pd.analyzed
                   || pd.getType() == Type.DATE.tag()
                   || pd.getType() == Type.BOOLEAN.tag()
                   || pd.getType() == Type.LONG.tag()
                   || pd.getType() == Type.DOUBLE.tag();
   ```



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