You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "nit0906 (via GitHub)" <gi...@apache.org> on 2023/02/23 04:29:31 UTC

[GitHub] [jackrabbit-oak] nit0906 commented on a diff in pull request #853: OAK-10118: fix inconsistencies between lucene and elastic on order by queries

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


##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/ElasticIndexPlanner.java:
##########
@@ -48,6 +53,8 @@ protected List<QueryIndex.OrderEntry> createSortOrder(IndexDefinition.IndexingRu
             PropertyDefinition pd = rule.getConfig(propName);
             if (pd != null
                     && o.getPropertyType() != null
+                    // functions on regexp-based properties must be skipped since the values cannot be indexed
+                    && (!pd.isRegexp || !propName.startsWith(QueryConstants.FUNCTION_RESTRICTION_PREFIX))

Review Comment:
   Do we want to ignore those properties that have regex enabled and have a function defined or either of these ? As per the comment it should be the first one but the condition is for the latter. 



-- 
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: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org