How do I create a solr core with the data from an existing one?

Posted by steve_d on Stack Overflow See other posts from Stack Overflow or by steve_d
Published on 2010-03-23T18:03:57Z Indexed on 2010/03/24 0:53 UTC
Read the original article Hit count: 275

Filed under:

Solr 1.4 Enterprise Search Server recommends doing large updates on a copy of the core, and then swapping it in for the main core. I am following these steps:

  1. Create prep core: http://localhost:8983/solr/admin/cores?action=CREATE&name=prep&instanceDir=main
  2. Perform index update, then commit/optimize on prep core.
  3. Swap main and prep core: http://localhost:8983/solr/admin/cores?action=SWAP&core=main&other=prep
  4. Unload prep core: http://localhost:8983/solr/admin/cores?action=UNLOAD&core=prep

The problem I am having is, the core created in step 1 doesn't have any data in it. If I am going to do a full index of everything and the kitchen sink, that would be fine, but if I just want to update a (large) subset of the documents - that's obviously not going to work.

(I could merge the cores, but part of what I'm trying to do is get rid of any deleted documents without trying to make a list of them.)

Is there some flag to the CREATE action that I'm missing? The Solr Wiki page for CoreAdmin is a little sparse on details.

© Stack Overflow or respective owner

Related posts about solr