Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.2, 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      SearcherFactory is often used as advertised for warming segments for newly flushed segments or for searchers that are opened for the first time (generally where merge warmers don't apply). To make this simpler we should pass the previous reader to the factory as well to know what needs to be warmed.

      1. LUCENE-6377.patch
        9 kB
        Simon Willnauer
      2. LUCENE-6377.patch
        11 kB
        Simon Willnauer

        Activity

        Hide
        anshumg Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        anshumg Anshum Gupta added a comment - Bulk close for 5.2.0.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1670654 from Simon Willnauer in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1670654 ]

        LUCENE-6377: Pass previous reader to SearcherFactory#newSearcher

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1670654 from Simon Willnauer in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1670654 ] LUCENE-6377 : Pass previous reader to SearcherFactory#newSearcher
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1670649 from Simon Willnauer in branch 'dev/trunk'
        [ https://svn.apache.org/r1670649 ]

        LUCENE-6377: Pass previous reader to SearcherFactory#newSearcher

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1670649 from Simon Willnauer in branch 'dev/trunk' [ https://svn.apache.org/r1670649 ] LUCENE-6377 : Pass previous reader to SearcherFactory#newSearcher
        Hide
        mikemccand Michael McCandless added a comment -

        +1

        Small typo in javadocs: "if unknown of if the given reader" -> "if unknown or if the given reader"

        Show
        mikemccand Michael McCandless added a comment - +1 Small typo in javadocs: "if unknown of if the given reader" -> "if unknown or if the given reader"
        Hide
        simonw Simon Willnauer added a comment -

        patch with test - I think it's ready

        Show
        simonw Simon Willnauer added a comment - patch with test - I think it's ready
        Hide
        jpountz Adrien Grand added a comment -

        +1

        Show
        jpountz Adrien Grand added a comment - +1
        Hide
        mikemccand Michael McCandless added a comment -

        +1

        Show
        mikemccand Michael McCandless added a comment - +1
        Hide
        rcmuir Robert Muir added a comment -

        I think its fine. Docs already link to mergedSegmentWarmer (which is the ideal way to do this warming in most situations), but at the very least this solves the "first reader problem" (an annoyance with mergedSegmentWarmer IMO) because you will get passed null the first time, so you can warm everything.

        Show
        rcmuir Robert Muir added a comment - I think its fine. Docs already link to mergedSegmentWarmer (which is the ideal way to do this warming in most situations), but at the very least this solves the "first reader problem" (an annoyance with mergedSegmentWarmer IMO) because you will get passed null the first time, so you can warm everything.
        Hide
        simonw Simon Willnauer added a comment -

        here is a patch just for the discussion. I wanna add tests etc. if folks are ok with the API change.

        Show
        simonw Simon Willnauer added a comment - here is a patch just for the discussion. I wanna add tests etc. if folks are ok with the API change.

          People

          • Assignee:
            simonw Simon Willnauer
            Reporter:
            simonw Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development