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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2013/08/12 11:29:50 UTC

[jira] [Updated] (OAK-955) Query: Filter doesn't contain fulltext constraints from joins

     [ https://issues.apache.org/jira/browse/OAK-955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mueller updated OAK-955:
-------------------------------

    Description: 
Example query:
{code}
SELECT a.* 
FROM [nt:unstructured] AS a 
INNER JOIN [nt:unstructured] AS b 
ON b.[jcr:uuid] = a.testref 
WHERE a.type = 'child' 
AND (CONTAINS(a.*, 'testJoinWithOR4') OR b.type = 'parent' AND CONTAINS(b.*, 'testJoinWithOR4'))
{code}

I'm not sure why this happens, but I noticed stepping through the code that the filter generated on the query doesn't contain any fulltext constraints. It does however contain the 'type' info which will trick the query engine into picking a property index, failing the test because is returns more results than it should.

See failing tests on the lucene module:
 - org.apache.jackrabbit.core.query.JoinTest#testJoinWithOR4
 - org.apache.jackrabbit.core.query.JoinTest#testJoinWithOR5

  was:
Example query:
{code}
SELECT a.* FROM [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS b ON b.[jcr:uuid] = a.testref WHERE a.type = 'child' AND (CONTAINS(a.*, 'testJoinWithOR4') OR b.type = 'parent' AND CONTAINS(b.*, 'testJoinWithOR4'))
{code}

I'm not sure why this happens, but I noticed stepping through the code that the filter generated on the query doesn't contain any fulltext constraints. It does however contain the 'type' info which will trick the query engine into picking a property index, failing the test because is returns more results than it should.

See failing tests on the lucene module:
 - org.apache.jackrabbit.core.query.JoinTest#testJoinWithOR4
 - org.apache.jackrabbit.core.query.JoinTest#testJoinWithOR5

    
> Query: Filter doesn't contain fulltext constraints from joins 
> --------------------------------------------------------------
>
>                 Key: OAK-955
>                 URL: https://issues.apache.org/jira/browse/OAK-955
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, query
>            Reporter: Alex Parvulescu
>            Priority: Minor
>
> Example query:
> {code}
> SELECT a.* 
> FROM [nt:unstructured] AS a 
> INNER JOIN [nt:unstructured] AS b 
> ON b.[jcr:uuid] = a.testref 
> WHERE a.type = 'child' 
> AND (CONTAINS(a.*, 'testJoinWithOR4') OR b.type = 'parent' AND CONTAINS(b.*, 'testJoinWithOR4'))
> {code}
> I'm not sure why this happens, but I noticed stepping through the code that the filter generated on the query doesn't contain any fulltext constraints. It does however contain the 'type' info which will trick the query engine into picking a property index, failing the test because is returns more results than it should.
> See failing tests on the lucene module:
>  - org.apache.jackrabbit.core.query.JoinTest#testJoinWithOR4
>  - org.apache.jackrabbit.core.query.JoinTest#testJoinWithOR5

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