You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2007/05/26 07:16:17 UTC

[jira] Commented: (SOLR-243) Create a hook to allow custome code to create custome index readers

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

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

some comments after reading the patch (haven't run it yet) ...

1) in the future, please use 2 spaces for indenting (and no tabs)

2) the existing public constructors for SolrIndexSearcher are now private which is an API change that has to be carefully considered ... on top of that, they don't even use the new IndexReder factory at all (they could get it by asking the SolrCore - it's a singleton).

3) instead of adding a new indexReaderFactory element directly to the solrconfig.xml, it would probably make sense to get it when parsing the mainIndex/indexDefaults blocks.

4) StandardIndexReaderFactory" might be a better class name then "DefaultIndexReaderFactory"

5) I don't think we really need IndexReaderFactory.DEFAULT (static final instances in interfaces never make sense to me, they are not part of the "interface")  ... just let SolrCore have a hardcoded instance of to use if it can't find one in the config.

6) people should be able to specify configuration options for their factories ... either using an init(NamedLIst) method (like RequestHandlers) or using an init(Map<String,String>) method (like Caches, TokenFilters, etc...)

7) catching "Exception" when calling newInstance() is too broad. explicitly catch only the exceptions that are expected and warrant using the default factory, otherwise you might silently ignore a really serious problem. ... although frankly, if someone configures an explict IndexReader, and it can't be instantiated, that should probably be SEVERE not just WARNING.





> 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
>
>
> 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.


Re: Parititoning support ?

Posted by Chris Hostetter <ho...@fucit.org>.
: Now we want to move to SOLR as it has host of other features. I was
: reading http://wiki.apache.org/solr/IndexPartitioning .
:
: Is there any JIRA issue corresponding to this feature (Tried searching
: but couldn't find any) ?

not directly, that was mainly just a brainstorming excercise.  there is a
patch that tackles the related goal of multiple "SolrCores" in a single
app context however...

   https://issues.apache.org/jira/browse/SOLR-215

...but i havne't relaly had a chance to look at it yet.

honestly, based on the description of your goal, it doens't sound like
"IndexPartitioning" is really what you want (the goal there is multiple
sub indexes managed by a single instance of solr) ... it sounds like what
you are interested in is more along the lines of...

   http://wiki.apache.org/solr/FederatedSearch

...multiple machines each with a seperate "shareds" of the index.



-Hoss


Parititoning support ?

Posted by Sharad Agarwal <sh...@aol.com>.
I am looking for the partitioning support in Solr. I have huge corpus of 
documents ~ 100M; so partitioning the index is almost a necessity. 
Currently we are using our internal developed index/search server based 
on lucene; and have implemented partitioning. It exposes Remote 
Searchable and work over Multisearcher.

Now we want to move to SOLR as it has host of other features. I was 
reading http://wiki.apache.org/solr/IndexPartitioning .
 
Is there any JIRA issue corresponding to this feature (Tried searching 
but couldn't find any) ?


Sharad Agarwal
Search Platforms Group
AOL