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

          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: