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 Brian Lamb <br...@journalexperts.com> on 2011/05/12 17:53:27 UTC

Changing the schema

If I change the field type in my schema, do I need to rebuild the entire
index? I'm at a point now where it takes over a day to do a full import due
to the sheer size of my application and I would prefer not having to reindex
just because I want to make a change somewhere.

Thanks,

Brian Lamb

Re: Changing the schema

Posted by Chris Hostetter <ho...@fucit.org>.
: If I change the field type in my schema, do I need to rebuild the entire
: index? I'm at a point now where it takes over a day to do a full import due
: to the sheer size of my application and I would prefer not having to reindex
: just because I want to make a change somewhere.

it really depends on the change.

gneral rule of thumb is "yes" but there are lots of exceptions depending 
on what you're doing and how concerned you are about consistency -- 
adding fields/fieldTypes really doesn't require reindexing unless you have 
a default value.  removing "required" or going from single valued to 
multivalued (ie: relaxing rules) doesn't require reindexing. changing 
analyzers ... oy.  that's a big ball of wax.

if you really know what you are doing, and fully understand what's 
changing under the covers, there are lots of cases where you don't need to 
reindex ... but it's not recommended in general.






-Hoss

Re: Changing the schema

Posted by Stefan Matheis <ma...@googlemail.com>.
Chamnap,

On Fri, May 13, 2011 at 2:59 PM, Chamnap Chhorn <ch...@gmail.com> wrote:
> I wonder what if I add new field in the schema, do i have to reindex?

If you're using that field within the DIH .. then of course yes, but
normally/otherwise: No :)

On Fri, May 13, 2011 at 2:59 PM, Chamnap Chhorn <ch...@gmail.com> wrote:
> If no need to reindex, can i just update the schema.xml directly? After
> that, Should I restart the tomcat service?

At least, you have to reload the Core-Config .. don't know exactly how
that works while using Tomcat -- with the packaged Jetty, it's just
hitting /admin/cores (while in Multicore-Mode) or restarting the
Java-Process (in Singlecore-Mode)

On Fri, May 13, 2011 at 2:59 PM, Chamnap Chhorn <ch...@gmail.com> wrote:
> If no need to reindex, how about the existing documents? If I do a query
> with new field, does it cause errors?

Afaik, the document are just not affected from searching and therefore
missing in/excluded from the result.

Regards
Stefan

Re: Changing the schema

Posted by Chamnap Chhorn <ch...@gmail.com>.
I wonder what if I add new field in the schema, do i have to reindex?

If no need to reindex, can i just update the schema.xml directly? After
that, Should I restart the tomcat service?

If no need to reindex, how about the existing documents? If I do a query
with new field, does it cause errors?

On Fri, May 13, 2011 at 1:38 PM, Otis Gospodnetic <
otis_gospodnetic@yahoo.com> wrote:

> Brian,
>
> Yes, you do need to reindex.  We've used Hadoop with Solr to speed up
> indexing
> by orders of magnitude for some of our customers.  Something to consider.
>
> Otis
> ----
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> Lucene ecosystem search :: http://search-lucene.com/
>
>
>
> ----- Original Message ----
> > From: Brian Lamb <br...@journalexperts.com>
> > To: solr-user@lucene.apache.org
> > Sent: Thu, May 12, 2011 11:53:27 AM
> > Subject: Changing the schema
> >
> > If I change the field type in my schema, do I need to rebuild the  entire
> > index? I'm at a point now where it takes over a day to do a full  import
> due
> > to the sheer size of my application and I would prefer not having  to
> reindex
> > just because I want to make a change  somewhere.
> >
> > Thanks,
> >
> > Brian Lamb
> >
>



-- 
Chhorn Chamnap
http://chamnapchhorn.blogspot.com/

Re: Changing the schema

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Brian,

Yes, you do need to reindex.  We've used Hadoop with Solr to speed up indexing 
by orders of magnitude for some of our customers.  Something to consider.

Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: Brian Lamb <br...@journalexperts.com>
> To: solr-user@lucene.apache.org
> Sent: Thu, May 12, 2011 11:53:27 AM
> Subject: Changing the schema
> 
> If I change the field type in my schema, do I need to rebuild the  entire
> index? I'm at a point now where it takes over a day to do a full  import due
> to the sheer size of my application and I would prefer not having  to reindex
> just because I want to make a change  somewhere.
> 
> Thanks,
> 
> Brian Lamb
>