[
https://issues.apache.org/jira/browse/OAK-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071568#comment-14071568
]
Thomas Mueller commented on OAK-1982:
-------------------------------------
Patch (not yet tested):
{noformat}
Index:
src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndex.java
===================================================================
---
src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndex.java
(revision 1612518)
+++
src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndex.java
(working copy)
@@ -87,6 +87,14 @@
LOG.debug("getPlans() - rootState: {} - ", root);
}
List<IndexPlan> plans = new ArrayList<IndexPlan>();
+ if (filter.getFullTextConstraint() != null) {
+ // not an appropriate index for full-text search
+ return plans;
+ }
+ if (filter.containsNativeConstraint()) {
+ // not an appropriate index for native search
+ return plans;
+ }
OrderedPropertyIndexLookup lookup = getLookup(root);
Collection<PropertyRestriction> restrictions =
filter.getPropertyRestrictions();
{noformat}
[~edivad], I believe you are working on a new ordered index implementation,
could you ensure to do the same there please?
> Ordered index must ignore full-text queries
> -------------------------------------------
>
> Key: OAK-1982
> URL: https://issues.apache.org/jira/browse/OAK-1982
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: query
> Affects Versions: 1.0, 1.0.1, 1.0.2
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.1, 1.0.3
>
>
> Currently, the ordered index does not check for full-text constraints (like
> the property index), and may returns a low cost for such cases.
> Only full-text indexes (Lucene, Solr) know how to process full-text
> conditions. Only those indexes are supposed to return a low cost for such
> queries.
--
This message was sent by Atlassian JIRA
(v6.2#6252)