XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      The Hits class has several drawbacks as pointed out in LUCENE-954.
      The other search APIs that use TopDocCollector and TopDocs should be used instead.

      This patch:

      • deprecates org/apache/lucene/search/Hits, Hit, and HitIterator, as well as
        the Searcher.search( * ) methods which return a Hits Object.
      • removes all references to Hits from the core and uses TopDocs and ScoreDoc
        instead
      • Changes the demo SearchFiles: adds the two modes 'paging search' and 'streaming search',
        each of which demonstrating a different way of using the search APIs. The former
        uses TopDocs and a TopDocCollector, the latter a custom HitCollector implementation.
      • Updates the online tutorial that descibes the demo.

      All tests pass.

        Attachments

        1. lucene-1290.patch
          214 kB
          Michael Busch
        2. lucene-1290.patch
          218 kB
          Michael Busch
        3. lucene-1290.patch
          236 kB
          Michael Busch

          Activity

            People

            • Assignee:
              michaelbusch Michael Busch
              Reporter:
              michaelbusch Michael Busch
            • Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: