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

IndexSearcher.document() should not be final

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: