[ 
https://issues.apache.org/jira/browse/NUTCH-945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218798#comment-13218798
 ] 

Sujit Pal commented on NUTCH-945:
---------------------------------

Needed something along these lines, so did this and attaching the patch and new 
files for this.

The multiple SOLR servers are specified on the bin/nutch solrindex command line 
like so:

bin/nutch solrindex http://localhost:8983/solr -all (for single SOLR server)
bin/nutch solrindex http://localhost:8983/solr,http://localhost:8983/solr -all 
(for distributing across 2 SOLR servers).

The default partitioner used is Hadoop's o.a.h.mapreduce...HashPartitioner. For 
single server, the default partitioner used is a new NonPartitioningPartitioner 
class (which also extends o.a.h.mapreduce...Partitioner class. Custom 
partitioners can be specified in nutch-site.xml (or nutch-default.xml) by 
specifying full class name of custom partitioner in solr.partitioner.class, 
like so:

{quote}
<property>
  <name>solr.partitioner.class</name>
  <value>com.mycompany.nutch.indexer.solr.MurmurHashPartitioner</value>
  <description/>
</property>
{quote}

I am also attaching the custom partitioner referenced above (SOLR 4.0 will use 
this partitioning strategy per Markus).

I have tested this locally (non-distributed environment) against a set of 6211 
documents. Here are the results, fwiw:

single server: 6211 records in 44.09s
2 servers using (default) hashmod partitioning: 3113 and 3098 records in 44.42s
2 servers using custom murmur partitioning: 3021 and 3190 records in 44.11s 

                
> Indexing to multiple SOLR Servers
> ---------------------------------
>
>                 Key: NUTCH-945
>                 URL: https://issues.apache.org/jira/browse/NUTCH-945
>             Project: Nutch
>          Issue Type: Improvement
>          Components: indexer
>    Affects Versions: 1.2
>            Reporter: Charan Malemarpuram
>
> It would be nice to have a default Indexer in Nutch, which can submit docs to 
> multiple SOLR Servers.
> > Partitioning is always the question, when writing to multiple SOLR Servers.
> > Default partitioning can be a simple hashcode based distribution with 
> > addition hooks to customization.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to