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 Charles-Andre Martin <Ch...@sunmedia.ca> on 2011/07/27 20:50:08 UTC

schema.xml changes, need re-indexing ?

Hi,

 

We currently have a big index in production. We would like to add 2 non-required fields to our schema.xml :

 

<field name="myfield" type="boolean" indexed="true" stored="true" required="false"/>          

<field name="myotherfield" type="string" indexed="true" stored="true" required="false" multiValued="true"/>           

 

I made some tests:

 

-          I stopped tomcat

-          I changed the schema.xml

-          I started tomcat

 

The data was still there and I was able to add new document with theses 2 fields.

 

So far, it looks I won't need to re-index all my data. Am I right ? Do I need to re-index all my data or in that case I'm fine ?

 

Thank you !

 

Charles-André Martin


RE: schema.xml changes, need re-indexing ?

Posted by Michael Ryan <mr...@moreover.com>.
You should be fine - no need to re-index your data.

Adding and removing fields is generally safe to do without a re-index. Changing a field (its type, analyzers, etc) requires more caution and generally does require a re-index.

-Michael

Re: schema.xml changes, need re-indexing ?

Posted by Alexei Martchenko <al...@superdownloads.com.br>.
I always run
http://localhost:8983/solr/admin/cores?action=RELOAD&core=corename in the
browser when I wanna reload solr and see any changes in config xmls.

2011/7/27 François Schiettecatte <fs...@gmail.com>

> I have not seen this mentioned anywhere, but I found a useful 'trick' to
> restart solr without having to restart tomcat. All you need to do is 'touch'
> the solr.xml in the solr.home directory. It can take a few seconds but solr
> will restart and reload any config.
>
> Cheers
>
> François
>
> On Jul 27, 2011, at 2:56 PM, Alexei Martchenko wrote:
>
> > I believe you're fine with that. Don't need to reindex all solr database.
> >
> > 2011/7/27 Charles-Andre Martin <Ch...@sunmedia.ca>
> >
> >> Hi,
> >>
> >>
> >>
> >> We currently have a big index in production. We would like to add 2
> >> non-required fields to our schema.xml :
> >>
> >>
> >>
> >> <field name="myfield" type="boolean" indexed="true" stored="true"
> >> required="false"/>
> >>
> >> <field name="myotherfield" type="string" indexed="true" stored="true"
> >> required="false" multiValued="true"/>
> >>
> >>
> >>
> >> I made some tests:
> >>
> >>
> >>
> >> -          I stopped tomcat
> >>
> >> -          I changed the schema.xml
> >>
> >> -          I started tomcat
> >>
> >>
> >>
> >> The data was still there and I was able to add new document with theses
> 2
> >> fields.
> >>
> >>
> >>
> >> So far, it looks I won't need to re-index all my data. Am I right ? Do I
> >> need to re-index all my data or in that case I'm fine ?
> >>
> >>
> >>
> >> Thank you !
> >>
> >>
> >>
> >> Charles-André Martin
> >>
> >>
> >
> >
> > --
> >
> > *Alexei Martchenko* | *CEO* | Superdownloads
> > alexei@superdownloads.com.br | alexei@martchenko.com.br | (11)
> > 5083.1018/5080.3535/5080.3533
>
>

Re: schema.xml changes, need re-indexing ?

Posted by François Schiettecatte <fs...@gmail.com>.
I have not seen this mentioned anywhere, but I found a useful 'trick' to restart solr without having to restart tomcat. All you need to do is 'touch' the solr.xml in the solr.home directory. It can take a few seconds but solr will restart and reload any config.

Cheers

François 

On Jul 27, 2011, at 2:56 PM, Alexei Martchenko wrote:

> I believe you're fine with that. Don't need to reindex all solr database.
> 
> 2011/7/27 Charles-Andre Martin <Ch...@sunmedia.ca>
> 
>> Hi,
>> 
>> 
>> 
>> We currently have a big index in production. We would like to add 2
>> non-required fields to our schema.xml :
>> 
>> 
>> 
>> <field name="myfield" type="boolean" indexed="true" stored="true"
>> required="false"/>
>> 
>> <field name="myotherfield" type="string" indexed="true" stored="true"
>> required="false" multiValued="true"/>
>> 
>> 
>> 
>> I made some tests:
>> 
>> 
>> 
>> -          I stopped tomcat
>> 
>> -          I changed the schema.xml
>> 
>> -          I started tomcat
>> 
>> 
>> 
>> The data was still there and I was able to add new document with theses 2
>> fields.
>> 
>> 
>> 
>> So far, it looks I won't need to re-index all my data. Am I right ? Do I
>> need to re-index all my data or in that case I'm fine ?
>> 
>> 
>> 
>> Thank you !
>> 
>> 
>> 
>> Charles-André Martin
>> 
>> 
> 
> 
> -- 
> 
> *Alexei Martchenko* | *CEO* | Superdownloads
> alexei@superdownloads.com.br | alexei@martchenko.com.br | (11)
> 5083.1018/5080.3535/5080.3533


Re: schema.xml changes, need re-indexing ?

Posted by Alexei Martchenko <al...@superdownloads.com.br>.
I believe you're fine with that. Don't need to reindex all solr database.

2011/7/27 Charles-Andre Martin <Ch...@sunmedia.ca>

> Hi,
>
>
>
> We currently have a big index in production. We would like to add 2
> non-required fields to our schema.xml :
>
>
>
> <field name="myfield" type="boolean" indexed="true" stored="true"
> required="false"/>
>
> <field name="myotherfield" type="string" indexed="true" stored="true"
> required="false" multiValued="true"/>
>
>
>
> I made some tests:
>
>
>
> -          I stopped tomcat
>
> -          I changed the schema.xml
>
> -          I started tomcat
>
>
>
> The data was still there and I was able to add new document with theses 2
> fields.
>
>
>
> So far, it looks I won't need to re-index all my data. Am I right ? Do I
> need to re-index all my data or in that case I'm fine ?
>
>
>
> Thank you !
>
>
>
> Charles-André Martin
>
>


-- 

*Alexei Martchenko* | *CEO* | Superdownloads
alexei@superdownloads.com.br | alexei@martchenko.com.br | (11)
5083.1018/5080.3535/5080.3533