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 Emad Mushtaq <em...@sigmatec.com.pk> on 2010/02/11 23:40:10 UTC

How to reindex data without restarting server

Hi,

I would like to know if there is a way of reindexing data without restarting
the server. Lets say I make a change in the schema file. That would require
me to reindex data. Is there a solution to this ?

-- 
Muhammad Emad Mushtaq
http://www.emadmushtaq.com/

Re: How to reindex data without restarting server

Posted by Emad Mushtaq <em...@sigmatec.com.pk>.
Thanks for responding to my question.

Let me just put a situation that might arise in future. I decide to add a
new field to the schema. So if I have understood you correctly, "piping it
through the whole process" would mean, that I delete records one by one, and
add the same records again. Basically if I change my schema, the new records
that I would add would be indexed on the new schema? That wouldn't require
server restart?

On Fri, Feb 12, 2010 at 3:49 AM, Sven Maurmann <sv...@kippdata.de>wrote:

> Hi,
>
> restarting the Solr server wouldn't help. If you want to re-index
> your data you have to pipe it through the whole process again.
>
> In your case it might be a good idea to consider having several
> cores holding the different schema definitions. This will not save
> you from getting the original data and doing the analysis once
> again, but at least you do not have a schema not being consistent
> with the data in the index.
>
> If you have a way to find and access the original data from the
> unique id in your index, you may create a small program that reads
> the data belonging to the id and sends it to the new core for
> indexing (just rough toughts depending of the nature of your
> situation).
>
> Cheers,
>    Sven
>
>
> --On Freitag, 12. Februar 2010 03:40 +0500 Emad Mushtaq <
> emad.mushtaq@sigmatec.com.pk> wrote:
>
>  Hi,
>>
>> I would like to know if there is a way of reindexing data without
>> restarting the server. Lets say I make a change in the schema file. That
>> would require me to reindex data. Is there a solution to this ?
>>
>> --
>> Muhammad Emad Mushtaq
>> http://www.emadmushtaq.com/
>>
>


-- 
Muhammad Emad Mushtaq
http://www.emadmushtaq.com/

Re: How to reindex data without restarting server

Posted by Sven Maurmann <sv...@kippdata.de>.
Hi,

restarting the Solr server wouldn't help. If you want to re-index
your data you have to pipe it through the whole process again.

In your case it might be a good idea to consider having several
cores holding the different schema definitions. This will not save
you from getting the original data and doing the analysis once
again, but at least you do not have a schema not being consistent
with the data in the index.

If you have a way to find and access the original data from the
unique id in your index, you may create a small program that reads
the data belonging to the id and sends it to the new core for
indexing (just rough toughts depending of the nature of your
situation).

Cheers,
     Sven

--On Freitag, 12. Februar 2010 03:40 +0500 Emad Mushtaq 
<em...@sigmatec.com.pk> wrote:

> Hi,
>
> I would like to know if there is a way of reindexing data without
> restarting the server. Lets say I make a change in the schema file. That
> would require me to reindex data. Is there a solution to this ?
>
> --
> Muhammad Emad Mushtaq
> http://www.emadmushtaq.com/

Re: How to reindex data without restarting server

Posted by Emad Mushtaq <em...@sigmatec.com.pk>.
Hi,

Thanks ! This is very useful :) :)

On Fri, Feb 12, 2010 at 7:55 AM, Joe Calderon <ca...@gmail.com>wrote:

> if you use the core model via solr.xml you can reload a core without having
> to to restart the servlet container,
> http://wiki.apache.org/solr/CoreAdmin
>
> On 02/11/2010 02:40 PM, Emad Mushtaq wrote:
>
>> Hi,
>>
>> I would like to know if there is a way of reindexing data without
>> restarting
>> the server. Lets say I make a change in the schema file. That would
>> require
>> me to reindex data. Is there a solution to this ?
>>
>>
>>
>
>


-- 
Muhammad Emad Mushtaq
http://www.emadmushtaq.com/

Re: How to reindex data without restarting server

Posted by Chris Hostetter <ho...@fucit.org>.
: How do I SWAP the old_core with the new_core. Is it to be done manually or
: does solr provide with a command for doing so. What if I don't make a new

you use the SWAP command, as described in the URL that was mentioned...

: > : http://wiki.apache.org/solr/CoreAdmin
: >
: > For making a schema change, the steps would be:
: >  - create a "new_core" with the new schema
: >  - reindex all the docs into "new_core"
: >  - "SWAP" "old_core" and "new_core" so all the old URLs now point at the
: > new core with the new schema.



-Hoss


Re: How to reindex data without restarting server

Posted by Emad Mushtaq <em...@sigmatec.com.pk>.
How do I SWAP the old_core with the new_core. Is it to be done manually or
does solr provide with a command for doing so. What if I don't make a new
core, make changes to the existing core, reindex it and  then utilize the
RELOAD command. Would this be a bad approach ?

On Sat, Feb 13, 2010 at 10:10 AM, Chris Hostetter
<ho...@fucit.org>wrote:

>
> : if you use the core model via solr.xml you can reload a core without
> having to
> : to restart the servlet container,
> : http://wiki.apache.org/solr/CoreAdmin
>
> For making a schema change, the steps would be:
>  - create a "new_core" with the new schema
>  - reindex all the docs into "new_core"
>  - "SWAP" "old_core" and "new_core" so all the old URLs now point at the
> new core with the new schema.
>
> -Hoss
>
>


-- 
Muhammad Emad Mushtaq
http://www.emadmushtaq.com/

Re: How to reindex data without restarting server

Posted by Chris Hostetter <ho...@fucit.org>.
: if you use the core model via solr.xml you can reload a core without having to
: to restart the servlet container,
: http://wiki.apache.org/solr/CoreAdmin

For making a schema change, the steps would be:
  - create a "new_core" with the new schema
  - reindex all the docs into "new_core"
  - "SWAP" "old_core" and "new_core" so all the old URLs now point at the 
new core with the new schema.

-Hoss


Re: How to reindex data without restarting server

Posted by Joe Calderon <ca...@gmail.com>.
if you use the core model via solr.xml you can reload a core without 
having to to restart the servlet container,
http://wiki.apache.org/solr/CoreAdmin
On 02/11/2010 02:40 PM, Emad Mushtaq wrote:
> Hi,
>
> I would like to know if there is a way of reindexing data without restarting
> the server. Lets say I make a change in the schema file. That would require
> me to reindex data. Is there a solution to this ?
>
>