Lucene - Core
  1. Lucene - Core
  2. LUCENE-3967

nuke AtomicReader.termDocsEnum(termState) and termPositionsEnum(termState)

    Details

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

      Description

      These are simply sugar methods anyway, and so expert that I don't think we need sugar here at all.
      If someone wants to get DocsEnum via a saved TermState they can just use TermsEnum!

      But having these public in AtomicReader i think is pretty confusing and overwhelming.

      In fact, nothing in Lucene even uses these methods, except a sole assert statement in PhraseQuery,
      which I think can be written more clearly anyway:

               // PhraseQuery on a field that did not index
               // positions.
               if (postingsEnum == null) {
      -          assert reader.termDocsEnum(liveDocs, t.field(), t.bytes(), state, false) != null: "termstate found but no term exists in reader";
      +          assert te.seekExact(t.bytes(), false) : "termstate found but no term exists in reader";
      

        Activity

        Robert Muir created issue -
        Robert Muir made changes -
        Field Original Value New Value
        Attachment LUCENE-3967.patch [ 12521888 ]
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0 [ 12314025 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development