Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This method is a trap: it looks legitimate but it has hideously poor performance (simple linear scan implemented in the TermsEnum base class since none of the concrete impls override it with a more efficient implementation).

      The least we should do for 2.9 is deprecate the method with a strong warning about its performance.

      See here for background: http://www.lucidimagination.com/search/document/77dc4f8e893d3cf3/possible_terminfosreader_speedup

      And, here for historical context:

      http://www.lucidimagination.com/search/document/88f1b95b404ebf16/remove_termenum_skipto_term_target

        Activity

        Hide
        Mark Miller added a comment -

        I made a quick update to the javadoc so its a bit less misleading, but still needs to be resolved in a stronger manner, al la this issue.

        Show
        Mark Miller added a comment - I made a quick update to the javadoc so its a bit less misleading, but still needs to be resolved in a stronger manner, al la this issue.
        Hide
        Michael McCandless added a comment -

        Moving out.

        Show
        Michael McCandless added a comment - Moving out.
        Hide
        Uwe Schindler added a comment -

        I think deprecation is to do now (before 3.0), so why move this out?
        I looked into the source code in trunk, this method is used nowhere, deprecating it should be no problem:

        @deprecated Use {@link IndexReader#terms(Term)} to
        create a new TermEnum. This method is not performant.
        
        Show
        Uwe Schindler added a comment - I think deprecation is to do now (before 3.0), so why move this out? I looked into the source code in trunk, this method is used nowhere, deprecating it should be no problem: @deprecated Use {@link IndexReader#terms(Term)} to create a new TermEnum. This method is not performant.
        Hide
        Michael McCandless added a comment -

        OK, excellent – can you commit that?

        Show
        Michael McCandless added a comment - OK, excellent – can you commit that?
        Hide
        Uwe Schindler added a comment -

        I will do this and close this issue, it is better to just deprecate and do not direct users to this method, that is not used (there is not even a test for it) and slow.

        Show
        Uwe Schindler added a comment - I will do this and close this issue, it is better to just deprecate and do not direct users to this method, that is not used (there is not even a test for it) and slow.
        Hide
        Michael McCandless added a comment -

        OK moving back to 2.9 & assigning to you Uwe!

        Show
        Michael McCandless added a comment - OK moving back to 2.9 & assigning to you Uwe!
        Hide
        Uwe Schindler added a comment -

        Committed revision: 783747

        Show
        Uwe Schindler added a comment - Committed revision: 783747

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development