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 Tirthankar Chatterjee <tc...@commvault.com> on 2013/11/20 06:18:50 UTC

Swapping Cores

Hi,
I have a site that I crawl and host the index. The web site has changes every month which requires it to re-crawl. Now there is a new SOLR index that is created. How effectively can I swap the previous one with the new one with minimal downtime for search. 

We have tried swapping the core but once due to any reason tomcat is restarted the temp core data is gone after the restart. Is there a way we dont lose the new index after the swap.

Thanks,
Tirthankar

 


***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: Swapping Cores

Posted by Otis Gospodnetic <ot...@gmail.com>.
Have a look at https://issues.apache.org/jira/browse/SOLR-4497 +
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-CreateormodifyanAliasforaCollection

Otis
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/


On Wed, Nov 20, 2013 at 12:18 AM, Tirthankar Chatterjee <
tchatterjee@commvault.com> wrote:

> Hi,
> I have a site that I crawl and host the index. The web site has changes
> every month which requires it to re-crawl. Now there is a new SOLR index
> that is created. How effectively can I swap the previous one with the new
> one with minimal downtime for search.
>
> We have tried swapping the core but once due to any reason tomcat is
> restarted the temp core data is gone after the restart. Is there a way we
> dont lose the new index after the swap.
>
> Thanks,
> Tirthankar
>
>
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for
> the
> sole use of the intended recipient. Any unauthorized review, use or
> distribution
> by others is strictly prohibited. If you have received the message by
> mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************
>

Re: Swapping Cores

Posted by Tirthankar Chatterjee <tc...@commvault.com>.
Hi Shawn,
It just slipped my mind to mention the details of my solr version. Good point and thought from your side. Thanks for checking back my emails. 

I am currently using SOLR4.3 but not SOLR CLOUD. WE have a technical documentation site which keeps changing with some new files and some deleted files. We use nutch to crawl for now, so this question where I want to swap the cores in run time when the new index is available. 

I will look into the link Otis sent me and will read the second paragraph. Till then please wait for my questions if I have any :-)
On Nov 20, 2013, at 12:12 PM, Shawn Heisey <so...@elyograg.org> wrote:

> On 11/19/2013 10:18 PM, Tirthankar Chatterjee wrote:
>> I have a site that I crawl and host the index. The web site has changes every month which requires it to re-crawl. Now there is a new SOLR index that is created. How effectively can I swap the previous one with the new one with minimal downtime for search. 
>> 
>> We have tried swapping the core but once due to any reason tomcat is restarted the temp core data is gone after the restart. Is there a way we dont lose the new index after the swap.
> 
> The reply you received from Otis assumes that you're using SolrCloud.  I
> looked back at previous messages that you have sent to the list, where
> you were using version 3.6, but that was over a year ago, so I don't
> know whether you've upgraded to 4.x yet, and I don't know if you've gone
> with SolrCloud.
> 
> If you are not using SolrCloud, then you can do core swapping, and the
> next paragraph will apply.  If you are using SolrCloud, then you can't;
> you must use collection aliasing.
> 
> Do you have persistent set to true in your solr.xml?  This is required
> for core swapping to work properly through restarts.
> 
> Thanks,
> Shawn
> 




***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: Swapping Cores

Posted by Shawn Heisey <so...@elyograg.org>.
On 11/19/2013 10:18 PM, Tirthankar Chatterjee wrote:
> I have a site that I crawl and host the index. The web site has changes every month which requires it to re-crawl. Now there is a new SOLR index that is created. How effectively can I swap the previous one with the new one with minimal downtime for search. 
> 
> We have tried swapping the core but once due to any reason tomcat is restarted the temp core data is gone after the restart. Is there a way we dont lose the new index after the swap.

The reply you received from Otis assumes that you're using SolrCloud.  I
looked back at previous messages that you have sent to the list, where
you were using version 3.6, but that was over a year ago, so I don't
know whether you've upgraded to 4.x yet, and I don't know if you've gone
with SolrCloud.

If you are not using SolrCloud, then you can do core swapping, and the
next paragraph will apply.  If you are using SolrCloud, then you can't;
you must use collection aliasing.

Do you have persistent set to true in your solr.xml?  This is required
for core swapping to work properly through restarts.

Thanks,
Shawn