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 "M.Rizwan" <gr...@gmail.com> on 2010/10/06 08:29:46 UTC

Changing schema and reindexing documents

Hi,

I have lots of documents in my solr index.
Now I have a requirement to change its schema and add a new field.

What should I do, so that all the documents keep working after schema
change?

Thanks

Riz

Re: Changing schema and reindexing documents

Posted by Lance Norskog <go...@gmail.com>.
If you add a field to the schema file and restart Solr, the existing
documents won't have that field. New documents that you index will. If
this is ok, you are safe.

In general, don't change the schema without indexing. You can trip
over the weirdest problems.

On Wed, Oct 6, 2010 at 12:31 AM, Gora Mohanty <go...@mimirtech.com> wrote:
> On Wed, Oct 6, 2010 at 11:59 AM, M.Rizwan <gr...@gmail.com> wrote:
>> Hi,
>>
>> I have lots of documents in my solr index.
>> Now I have a requirement to change its schema and add a new field.
>>
>> What should I do, so that all the documents keep working after schema
>> change?
> [...]
>
> You will need to reindex if the schema is changed.
>
> Regards,
> Gora
>



-- 
Lance Norskog
goksron@gmail.com

Re: Changing schema and reindexing documents

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Oct 6, 2010 at 11:59 AM, M.Rizwan <gr...@gmail.com> wrote:
> Hi,
>
> I have lots of documents in my solr index.
> Now I have a requirement to change its schema and add a new field.
>
> What should I do, so that all the documents keep working after schema
> change?
[...]

You will need to reindex if the schema is changed.

Regards,
Gora