lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (SOLR-243) Create a hook to allow custome code to create custome index readers
Date Wed, 30 May 2007 18:58:15 GMT


Yonik Seeley commented on SOLR-243:

Thanks John, I also have a need for this type of functionality.
In my case, I need to open open a MultiReader over several index segments.

One thing that crosses my mind is if some factories will need a little more context, such
as what reader is being created (for what purpose).  For example, is it the main index reader,
or is it for something like the spelling index, is it only for deleting in the IndexWriter,

When instantiating the factory, why not just call Config.newInstance(name) and let it throw
an exception (or did you want to continue on after a failure to find or instantiate?)

> Create a hook to allow custome code to create custome index readers
> -------------------------------------------------------------------
>                 Key: SOLR-243
>                 URL:
>             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: 
> 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:
> 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.

View raw message