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 Jack L <jl...@yahoo.ca> on 2007/02/22 22:37:36 UTC

Re[4]: Starting an index...

Hello Erik,

> Wouldn't even matter if there were field name "conflicts".  A field
> by any other name is just a field.  All document types could have a
> "title" field, for example.

That makes sense.

I wonder what happens if I change the schema after some documents
have been inserted? Is this allowed at all? Will the index become
corrupted if I add/remove some fields? Or change the field properties?

Jack


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Re[4]: Starting an index...

Posted by Chris Hostetter <ho...@fucit.org>.
: I guess I'm weary of a mismatch between an index and the schema, and
: can't say that I recommend that at this point without seeing where it
: may have issues.

modifying a schema without rebuilding the index from scratch is in fact
"deep voodoo" -- some things work okay; some things break horribly;
some things are safe to change on "query slaves" (machines that only
search against an index) once the full index has been replicated over from
the master - which needed the changes and a complete deletion of hte index
before indexing the new records ... etc.

enumerating all of the things you can/can't get away with is beyond the
scope of what i'm willing to try and type up right now ... suffice to say
there are tricks, and once you get more comfortable with Solr you can
experiment with those tricks.



-Hoss


Re: Re[4]: Starting an index...

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 22, 2007, at 4:49 PM, Walter Underwood wrote:

> On 2/22/07 1:37 PM, "Jack L" <jl...@yahoo.ca> wrote:
>
>> I wonder what happens if I change the schema after some documents
>> have been inserted? Is this allowed at all? Will the index become
>> corrupted if I add/remove some fields? Or change the field  
>> properties?
>
> The schema just controls the input mapping. After the fields
> are indexed, the schema doesn't control them.

However I think things would get funky if you remove some fields from  
the schema that are in the index, and then a document with fields not  
in the schema gets returned... no?

I suggest, Jack, that you look into the dynamic field feature.  You  
can have fields mapped in the schema with a wildcard, such as  
*_text.  Then your client can add anything_text it likes.  No need to  
remove from the schema.

I guess I'm weary of a mismatch between an index and the schema, and  
can't say that I recommend that at this point without seeing where it  
may have issues.

	Erik


Re: Re[4]: Starting an index...

Posted by Walter Underwood <wu...@netflix.com>.
On 2/22/07 1:37 PM, "Jack L" <jl...@yahoo.ca> wrote:

> I wonder what happens if I change the schema after some documents
> have been inserted? Is this allowed at all? Will the index become
> corrupted if I add/remove some fields? Or change the field properties?

The schema just controls the input mapping. After the fields
are indexed, the schema doesn't control them.

wunder