[ https://issues.apache.org/jira/browse/SOLR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Miller updated SOLR-243: ----------------------------- Attachment: SOLR-243.patch Okay, I am after SOLR-465, but since this guy hovers around it, so: New patch with a test to be sure the config / alt factory is indeed used. Factory class loaded in SolrCore now with the pluginloader - added a new loadSingle method. SolrIndexConfig really doesn't seem like the right place for that method that was there anyway... So, in pushing SOLR-465, I'd like to do things pretty much as is over there (except use the pluginloader stuff) just before loading the reader factory, so that the correct Directory imp can be passed to the getReader method. So comments to how this is done here will direct what I attempt there. Thoughts? Pick away please, I'd like to help out wrapping this and 465 soon. > Create a hook to allow custom code to create custom IndexReaders > ---------------------------------------------------------------- > > Key: SOLR-243 > URL: https://issues.apache.org/jira/browse/SOLR-243 > Project: Solr > Issue Type: Improvement > Components: search > Environment: Solr core > Reporter: John Wang > Assignee: Hoss Man > Attachments: indexReaderFactory.patch, indexReaderFactory.patch, > indexReaderFactory.patch, indexReaderFactory.patch, indexReaderFactory.patch, > indexReaderFactory.patch, indexReaderFactory.patch, SOLR-243.patch > > > 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 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.