You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2013/06/06 15:30:20 UTC
[jira] [Created] (OAK-859) Query engine skips fulltext search
conditions in the filter
Alex Parvulescu created OAK-859:
-----------------------------------
Summary: 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