lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "MergingSolrIndexes" by ShalinMangar
Date Tue, 21 Jun 2011 17:21:03 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "MergingSolrIndexes" page has been changed by ShalinMangar:

Added details of srcCore param in mergeindexes action

  '''NOTE''': In this example core0 must exist and have a compatible schema with core1 and
core2. The 'mergeindexes' command will not create a new core named 'core0' if it does not
already exist.
+ <!> [[Solr3.3]]
+ !CoreAdminHandler also supports merging one or more cores into another core (since Solr
3.3) through a "srcCore" parameter.
+ {{{
+ http://localhost:8983/solr/admin/cores?action=mergeindexes&core=core0&srcCore=core1&srcCore=core2
+ }}}
+ The differences between using "srcCore" parameter and "indexDir" parameter are that:
+  1. Using the "indexDir" parameter one can merge indexes not associated with a Solr Core
e.g. indexes built directly via Lucene
+  1. Using the "indexDir" parameter, one must take care that the index is not being written
to - this means closing !IndexWriter or if it is a solr core's index, issuing a commit command.
+  1. The "indexDir" must be the path to an index directory on the disk of the solr host -
this makes it cumbersome. On the other hand, one can just give the core name with "srcCore"
+  1. Using "srcCore", care is taken to ensure that the merged index is not corrupted even
if writes are happening in parallel on the source index
  == Merging Through Lucene IndexMergeTool ==
  Another way is to use the !IndexMergeTool that comes as part of lucene-misc. In order to
do this:

View raw message