[
https://issues.apache.org/jira/browse/OAK-859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13677059#comment-13677059
]
Thomas Mueller commented on OAK-859:
------------------------------------
Hm, I wonder what is the difference between:
{code}
(jcr:contains(jcr:content, 'blockbuster') or
jcr:contains(jcr:content/@jcr:title, 'blockbuster') or
jcr:contains(jcr:content/@jcr:description, 'blockbuster'))
{code}
and just:
{code}
jcr:contains(jcr:content, 'blockbuster')
{code}
The later should use an index. The former doesn't currently use an index; for
this we would probably need to change the QueryIndex interface to support
multiple filters.
> Query engine skips fulltext search conditions in the filter
> -----------------------------------------------------------
>
> Key: OAK-859
> URL: https://issues.apache.org/jira/browse/OAK-859
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: Alex Parvulescu
>
> I have a fulltext search that contains a bunch of 'or' conditions
> {code}
> /jcr:root/content/geometrixx-media/en//element(*,
> nt:hierarchyNode)[(jcr:contains(jcr:content, 'blockbuster') or
> jcr:contains(jcr:content/@jcr:title, 'blockbuster') or
> jcr:contains(jcr:content/@jcr:description, 'blockbuster'))]/rep:excerpt(.)
> order by @jcr:score descending
> {code}
> this gets transformed into the following sql2
> {code}
> select [jcr:path], [jcr:score], [rep:excerpt] from [nt:hierarchyNode] as a
> where (contains([jcr:content/*], 'blockbuster') or
> contains([jcr:content/jcr:title], 'blockbuster') or
> contains([jcr:content/jcr:description], 'blockbuster')) and
> isdescendantnode(a, '/content/geometrixx-media/en') order by [jcr:score] desc
> {code}
> The problem here is that the query engine will skip the full text conditions
> when generating the 'filter' object used in the _#getCost_ and _#query_ so
> that the fulltext index cannot factor the info in.
> The aforementioned query currently generates a lot of traversals.
> Unit tests on this parts are a bit tricky, so I cannot attach a real test
> yet, I can only point out that FilterImpl#fulltextConditions is emtpy
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira