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

Suggest queries return duplicate entries if prefetch is enabled

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.60.0
    • query
    • None

    Description

      If prefetch is enabled, and prefetch count is larger than 0, then suggest queries return duplicate results.

      This seems to be caused by oak-search FulltextIndex.FulltextPathCursor: FulltextPathCursor.next() returns a new IndexRow that references currentRow. But pathIterator.next() updates currentRow. So that the following code can return different results:

      // here, excerpt1 and except2 are different:
      IndexRow row1 = fulltextPathCursor.next();
      String excerpt1 = row1.getValue("rep:excerpt"));
      IndexRow row2 = fulltextPathCursor.next();
      String excerpt2 = row2.getValue("rep:excerpt"));
      
      // here, excerpt1 is equal to except2:
      IndexRow row1 = fulltextPathCursor.next();
      IndexRow row2 = fulltextPathCursor.next();
      String excerpt1 = row1.getValue("rep:excerpt"));
      String excerpt2 = row2.getValue("rep:excerpt"));
      

      Attachments

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              thomasm Thomas Mueller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: