Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4663

IndexSearcher.document() should not be final

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.1, 6.0
    • None
    • None
    • New

    Description

      IndexSearcher has 3 methods:

      StoredDocument doc(int)
      void doc(int, StoredFieldVisitor)
      final StoredDocument document(int, Set<String>)
      

      The last one is confusing for subclasses (e.g. SolrIndexSearcher) that override these methods. for example that one has its own StoredDocument doc(int, Set) method.

      But now this means a user could always call the wrong method (this final document() method) and get the wrong behavior (versus calling doc()).

      I think the name is also wrong. it should be doc() like the others.

      Attachments

        1. LUCENE-4663.patch
          1 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: