You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by mraible <ma...@raibledesigns.com> on 2010/08/26 00:31:56 UTC

Create a new index while Solr is running

We're starting to use Solr for our application. The data that we'll be
indexing will change often and not accumulate over time. This means that we
want to blow away our index and re-create it every hour or so. What's the
easier way to do this while Solr is running and not give users a "no data
found" while we're doing it? In other words, keep the existing index in
place until the new one is done being created. I searched the docs a bit,
but couldn't find the answer I was looking for. 

Thanks,

Matt
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Create-a-new-index-while-Solr-is-running-tp1342556p1342556.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Create a new index while Solr is running

Posted by Ron Mayer <rm...@0ape.com>.
mraible wrote:
> We're starting to use Solr for our application. The data that we'll be
> indexing will change often and not accumulate over time. This means that we
> want to blow away our index and re-create it every hour or so. What's the
> easier way to do this while Solr is running and not give users a "no data
> found" while we're doing it? In other words, keep the existing index in
> place until the new one is done being created. I searched the docs a bit,
> but couldn't find the answer I was looking for. 

The "Multi-core" feature seems to work pretty well for me with a similar
case where I re-build indexes while a system's still live...
   http://wiki.apache.org/solr/CoreAdmin
in particular you might be interested in the "SWAP" core command
on that page seems to be what you want.

The one thing I didn't figure out yet is that while my new index
is building, and it decides to merge segments, everything (even
connecting to the admin page) on the other core is annoyingly slow.
Not sure if the machine's just too I/O constrained, or if something
else is happening.   I guess a common solution is to build the new
index on a different machine and use replication to move it over....


Oh - or wouldn't everything just magically work if you do your deletes
and adds and make sure you don't "commit" until all the adds were done?

Re: Create a new index while Solr is running

Posted by "scott chu (朱炎詹)" <sc...@udngroup.com>.
Take a look at Multicore feature, particular the SWAP, CREATE & MERGE 
actions.

Eric Pugh's "Solr 1.4 Enterprise Search Server" Book has good explanation.

Scott

----- Original Message ----- 
From: "mraible" <ma...@raibledesigns.com>
To: <so...@lucene.apache.org>
Sent: Thursday, August 26, 2010 6:31 AM
Subject: Create a new index while Solr is running


>
> We're starting to use Solr for our application. The data that we'll be
> indexing will change often and not accumulate over time. This means that 
> we
> want to blow away our index and re-create it every hour or so. What's the
> easier way to do this while Solr is running and not give users a "no data
> found" while we're doing it? In other words, keep the existing index in
> place until the new one is done being created. I searched the docs a bit,
> but couldn't find the answer I was looking for.
>
> Thanks,
>
> Matt
> -- 
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Create-a-new-index-while-Solr-is-running-tp1342556p1342556.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


--------------------------------------------------------------------------------



¥¼¦b¶Ç¤J°T®§¤¤§ä¨ì¯f¬r¡C
Checked by AVG - www.avg.com
Version: 9.0.851 / Virus Database: 271.1.1/3093 - Release Date: 08/25/10 
14:34:00