Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-955

Query: Filter doesn't contain fulltext constraints from joins

    XMLWordPrintableJSON

Details

    Description

      Example query:

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

      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

      Attachments

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              stillalex Alex Deparvu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: