Lucene - Core
  1. Lucene - Core
  2. LUCENE-3205

remove MultiTermQuery get/inc/clear totalNumberOfTerms

    Details

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

      Description

      This method is not correct if the index has more than one segment.
      Its also not thread safe, and it means calling query.rewrite() modifies
      the original query.

      All of these things add up to confusion, I think we should remove this
      from multitermquery, the only thing that "uses" it is the NRQ tests, which
      conditionalizes all the asserts anyway.

      1. LUCENE-3205-3x.patch
        24 kB
        Uwe Schindler
      2. LUCENE-3205.patch
        28 kB
        Uwe Schindler
      3. LUCENE-3205.patch
        20 kB
        Robert Muir

        Activity

        Hide
        Uwe Schindler added a comment -

        I am perfectly fine to remove it. For analysis and debugging NRQ, it would still be good to have something, but I suggest to change the tests (I will simply request TermsEnum and count terms, possibly on MultiTerms).

        Should I take the issue and modify my tests?

        Show
        Uwe Schindler added a comment - I am perfectly fine to remove it. For analysis and debugging NRQ, it would still be good to have something, but I suggest to change the tests (I will simply request TermsEnum and count terms, possibly on MultiTerms). Should I take the issue and modify my tests?
        Hide
        Robert Muir added a comment -

        yes, please do?

        Show
        Robert Muir added a comment - yes, please do?
        Hide
        Simon Willnauer added a comment -

        uwe can you move this forward for a possible 3.5 release any time soon?

        Show
        Simon Willnauer added a comment - uwe can you move this forward for a possible 3.5 release any time soon?
        Hide
        Uwe Schindler added a comment -

        Working on a new test that counts the returned TermsEnum as replacement in TestNRQ.

        Show
        Uwe Schindler added a comment - Working on a new test that counts the returned TermsEnum as replacement in TestNRQ.
        Hide
        Simon Willnauer added a comment -

        Working on a new test that counts the returned TermsEnum as replacement in TestNRQ.

        thanks uwe!

        Show
        Simon Willnauer added a comment - Working on a new test that counts the returned TermsEnum as replacement in TestNRQ. thanks uwe!
        Hide
        Uwe Schindler added a comment -

        Patch with improved tests and removed stats functions (for trunk).

        I will commit this soon and merge backwards (but only deprecate in 3.x).

        Show
        Uwe Schindler added a comment - Patch with improved tests and removed stats functions (for trunk). I will commit this soon and merge backwards (but only deprecate in 3.x).
        Hide
        Uwe Schindler added a comment -

        Committed trunk revision: 1201329

        Show
        Uwe Schindler added a comment - Committed trunk revision: 1201329
        Hide
        Uwe Schindler added a comment -

        Patch for 3.x

        Show
        Uwe Schindler added a comment - Patch for 3.x
        Hide
        Uwe Schindler added a comment -

        Committed 3.x revision: 1201334

        Show
        Uwe Schindler added a comment - Committed 3.x revision: 1201334
        Hide
        Uwe Schindler added a comment -

        Bulk close after release of 3.5

        Show
        Uwe Schindler added a comment - Bulk close after release of 3.5

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development