Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.4, 4.0-ALPHA
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Lucene Fields:
      New

      Description

      We added IS.searchAfter(Query, Filter) but we don't support Sort yet with this API.

      I think it might be overkill at least at first to try to implement 12 collector variants for this.
      I put the following idea on SOLR-1726:

      One idea would be to start with one or two implementations (maybe in/out of order) for the sorting case, and dont overspecialize it yet.

      • for page 1, the ScoreDoc (FieldDoc really) will be null, so we just return the normal impl anyway.
      • even if our searchAfter isnt huper-duper fast, the user can always make the tradeoff like with page-by-score. they can always just pass null until like page 10 or something if they compute that it only starts to 'help' then.
      1. LUCENE-3514.patch
        58 kB
        Michael McCandless
      2. LUCENE-3514.patch
        50 kB
        Michael McCandless

        Issue Links

          Activity

          Hide
          Michael McCandless added a comment -

          Patch, also adding searchAfter for searches that have use a Sort...

          I also removed IndexSearcher's "global" setDefaultFieldSortScoring
          method and added expert search methods allowing you to pass those two
          booleans on a per-search basis.

          I added Sort to TestSearchAfter.

          I had to add a new method to FieldComparator (compareDocToValue)...

          I still need to fix javadocs and some nocommits but I think the patch
          is otherwise close...

          Show
          Michael McCandless added a comment - Patch, also adding searchAfter for searches that have use a Sort... I also removed IndexSearcher's "global" setDefaultFieldSortScoring method and added expert search methods allowing you to pass those two booleans on a per-search basis. I added Sort to TestSearchAfter. I had to add a new method to FieldComparator (compareDocToValue)... I still need to fix javadocs and some nocommits but I think the patch is otherwise close...
          Hide
          Michael McCandless added a comment -

          I have new version of the patch ... fixes an unrelated bug where maxScore is not properly set if you pass an ES to IndexSearcher ... but Jira seems to be broken now (cannot upload patches).

          I also fixed up the javadocs ... I think it's ready.

          Show
          Michael McCandless added a comment - I have new version of the patch ... fixes an unrelated bug where maxScore is not properly set if you pass an ES to IndexSearcher ... but Jira seems to be broken now (cannot upload patches). I also fixed up the javadocs ... I think it's ready.
          Hide
          Michael McCandless added a comment -

          Patch ... I think it's ready.

          Show
          Michael McCandless added a comment - Patch ... I think it's ready.
          Hide
          Robert Muir added a comment -

          Looks good! Thanks for tackling this. The API doesnt seem incomplete anymore.

          Show
          Robert Muir added a comment - Looks good! Thanks for tackling this. The API doesnt seem incomplete anymore.

            People

            • Assignee:
              Michael McCandless
              Reporter:
              Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development