Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-243

Create a hook to allow custom code to create custom IndexReaders

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: search
    • Labels:
      None
    • Environment:

      Solr core

      Description

      I have a customized IndexReader and I want to write a Solr plugin to use my derived IndexReader implementation. Currently IndexReader instantiation is hard coded to be:
      IndexReader.open(path)

      It would be really useful if this is done thru a plugable factory that can be configured, e.g. IndexReaderFactory

      interface IndexReaderFactory{
      IndexReader newReader(String name,String path);
      }

      the default implementation would just return: IndexReader.open(path)

      And in the newSearcher and getSearcher methods in SolrCore class can call the current factory implementation to get the IndexReader instance and then build the SolrIndexSearcher by passing in the reader.

      It would be really nice to add this improvement soon (This seems to be a trivial addition) as our project really depends on this.

      Thanks

      -John

        Attachments

        1. indexReaderFactory.patch
          10 kB
          Hoss Man
        2. indexReaderFactory.patch
          9 kB
          Hoss Man
        3. indexReaderFactory.patch
          9 kB
          Hoss Man
        4. indexReaderFactory.patch
          9 kB
          Hoss Man
        5. indexReaderFactory.patch
          7 kB
          John Wang
        6. indexReaderFactory.patch
          6 kB
          John Wang
        7. indexReaderFactory.patch
          6 kB
          John Wang
        8. SOLR-243.patch
          15 kB
          Mark Miller
        9. SOLR-243.patch
          43 kB
          Mark Miller
        10. SOLR-243.patch
          16 kB
          Mark Miller
        11. SOLR-243.patch
          13 kB
          Mark Miller
        12. SOLR-243.patch
          12 kB
          Andrzej Bialecki
        13. SOLR-243.patch
          12 kB
          Mark Miller
        14. SOLR-243.patch
          12 kB
          Mark Miller
        15. SOLR-243.patch
          27 kB
          Mark Miller
        16. SOLR-243.patch
          28 kB
          Mark Miller
        17. SOLR-243.patch
          26 kB
          Mark Miller
        18. SOLR-243.patch
          27 kB
          Mark Miller

          Issue Links

            Activity

              People

              • Assignee:
                markrmiller@gmail.com Mark Miller
                Reporter:
                john.wang@gmail.com John Wang
              • Votes:
                6 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: