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

No matching result found with use of relative property names in fulltext search in some cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Pending Closed
    • None
    • 1.0.14, 1.2.3, 1.3.0, 1.4
    • lucene
    • None

    Description

      LucenePropertyIndex has support for transforming path when relative property names are used in fulltext search. Consider a case like below

      +a1/doNotInclude/@propa=foo
      +a2/doNotInclude/@propa=foo
      ...
      +b/jcr:content/@propa=foo
      

      And a query like

      /jcr:root//element(*, nt:base)[jcr:contains(jcr:content, 'foo' )]

      Here the query uses a relative node name in contains jcr:content and only valid result is /b. Internally the query performed does not have any node name constraint and result in all path. Then while iterating the cursor would transform the path and see if path end with required name or not. If thats not the case then that result is ignored.

      This logic works fine for normal cases. But if it so happens that first 50 results (default batch size) got ignored due to name mismatch then cursor would terminate early without looking further for valid result and hence end result appears that no matching results are found

      Attachments

        1. OAK-2863.patch
          11 kB
          Chetan Mehrotra

        Activity

          People

            chetanm Chetan Mehrotra
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: