[ 
https://issues.apache.org/jira/browse/SOLR-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503691
 ] 

Hoss Man commented on SOLR-243:
-------------------------------

comments on the latest patch..

1) SolrIndexSeacher constructor is still private

2) i believe Yonik's question about calling Config.newInstance(name) was in 
realtion to initializing the Factory (you currently just use "factory = 
clazz.newInstance()")

3) my comment about the mainIndex/indexDefaults blocks was that for many 
options they can be specified in the indexDefaults section, and overriden in 
the mainIndex section ... from what i can tell the current patch requires it to 
be in indexDefaults, ideally it would follow the same behavior as the other 
settings (mainIndex is used for the .. well, "main index" while indexDefaults 
also applies to other intermediate indexes ... down the road we may deprecate 
it, or expand it's usage for other types of micro indexes various pieces of 
functionality use like spellchecking) but for now any option relating to an 
indexreader/writer should support the "dfaulting mechanism and work with both 
sections.


(I'm not sure what type of API Yonik might have been thinking of for conveying 
context).


> Create a hook to allow custome code to create custome index readers
> -------------------------------------------------------------------
>
>                 Key: SOLR-243
>                 URL: https://issues.apache.org/jira/browse/SOLR-243
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.3
>         Environment: Solr core
>            Reporter: John Wang
>             Fix For: 1.3
>
>         Attachments: indexReaderFactory.patch, indexReaderFactory.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.

Reply via email to