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 Ben Hsu <bh...@criticalmention.com> on 2011/10/12 19:58:48 UTC

updating schema.xml in production solr, multiple cores

Hello Solr users.

My organization is working on a solr implementation with multiple cores. I
want to prepare us for the day when we'll need to make a change to our
schema.xml, and roll that change into our production environment.

I believe we'll need to perform the following steps:
# delete all our documents
# update the schema.xml in all our cores
# rebuild the index from the source data.

Have any of you done this? What has your experience been?

Re: updating schema.xml in production solr, multiple cores

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Oct 12, 2011 at 11:28 PM, Ben Hsu <bh...@criticalmention.com> wrote:
> Hello Solr users.
>
> My organization is working on a solr implementation with multiple cores. I
> want to prepare us for the day when we'll need to make a change to our
> schema.xml, and roll that change into our production environment.
>
> I believe we'll need to perform the following steps:
> # delete all our documents
> # update the schema.xml in all our cores
> # rebuild the index from the source data.
>
> Have any of you done this? What has your experience been?

Yes, we have done this several times without issues. Your steps
are essentially correct if you are OK with downtime on the server,
but you can update the schema first. If you are indexing through
DIH, it will clear the index by default on a full-import.

If you want to minimise downtime, you can index outside of your
production servers, and copy/replicate the new index.

Regards,
Gora

Re: updating schema.xml in production solr, multiple cores

Posted by Jan Høydahl <ja...@cominvent.com>.
I would consider "shadow" cores for this use case. Say you have coreA live, and a coreB which is not live.

Then, upgrade schema in coreB, clear the index, feed all content, test that it works ok, and finally, do a CORE.SWAP /solr/admin/cores?action=SWAP&core=coreA&other=coreB - See http://wiki.apache.org/solr/CoreAdmin#SWAP or alternatively do the name swap in your frontend and feeder and keep track of whether A or B is live.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 12. okt. 2011, at 19:58, Ben Hsu wrote:

> Hello Solr users.
> 
> My organization is working on a solr implementation with multiple cores. I
> want to prepare us for the day when we'll need to make a change to our
> schema.xml, and roll that change into our production environment.
> 
> I believe we'll need to perform the following steps:
> # delete all our documents
> # update the schema.xml in all our cores
> # rebuild the index from the source data.
> 
> Have any of you done this? What has your experience been?