Lucene - Core
  1. Lucene - Core
  2. LUCENE-1925

In IndexSearcher class, make subReader and docCount arrays protected so sub classes can access them

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 3.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Please make these two member variables protected so subclasses can access them, e.g.:

      protected IndexReader[] subReaders;
      protected int[] docStarts;

      Thanks

      1. LUCENE-1925.patch
        1 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        +1

        We should also reserve future non back compatibility (mark them "expert/subject to suddenly change").

        Show
        Michael McCandless added a comment - +1 We should also reserve future non back compatibility (mark them "expert/subject to suddenly change").
        Hide
        Tim Smith added a comment -

        i would also like to see a protected constructor that takes:
        IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docOffsets)

        this way a subclass can avoid any constructor costs and pass exactly the sub readers/offsets it wants
        this constructor would also be marked "expert/subject to change" of course

        Show
        Tim Smith added a comment - i would also like to see a protected constructor that takes: IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docOffsets) this way a subclass can avoid any constructor costs and pass exactly the sub readers/offsets it wants this constructor would also be marked "expert/subject to change" of course
        Hide
        Michael McCandless added a comment -

        Attached patch, making the members protected & added expert ctor.

        Show
        Michael McCandless added a comment - Attached patch, making the members protected & added expert ctor.
        Hide
        Michael McCandless added a comment -

        Thanks John & Tim!

        Show
        Michael McCandless added a comment - Thanks John & Tim!

          People

          • Assignee:
            Michael McCandless
            Reporter:
            John Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development