Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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
        11 kB
        Simon Willnauer
      2. LUCENE-6377.patch
        9 kB
        Simon Willnauer

        Activity

        Hide
        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
        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.
        Hide
        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
        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
        Michael McCandless added a comment -

        +1

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

        +1

        Show
        Adrien Grand added a comment - +1
        Hide
        Simon Willnauer added a comment -

        patch with test - I think it's ready

        Show
        Simon Willnauer added a comment - patch with test - I think it's ready
        Hide
        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
        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
        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
        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
        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
        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
        Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        Anshum Gupta added a comment - Bulk close for 5.2.0.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development