Reputation: 11
I have a problem:
I use (it is a constraint) solr 4.10.3
I have already a collection with a lot of documents that uses a schema.xml with static and dynamic fields.
Unfortunately, in the file schema.xml
there are already dynamic fileds for all types (string, text, int, etc..) except for the type "date" .
Now, I need that in the collection must be present also a dynamic field with type "date".
Is it enough to add in the schema.xml (the type "date" is already defined in the schema.xml) the following item ?:
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
So (important for me), after this adding of dynamic field, is it only necessary to perform the 2 proper commands of zkcli.sh (commands upconfig and linkconfig)?
Is it (after) also necessary the reindexing of the collection? (I hope no, maybe, because I added only a dynamic field (in the schema) and not static field, the reindexing is not necessary, I hope).
In case I need the reindexing of the collection, how can I perform it ?
Thanks for a possible help.
Regards.
Fabrizio
Upvotes: 0
Views: 467
Reputation: 52792
Whether reindexing is required is not dependent on the type (i.e. dynamic or static) of the field; only whether you want to change any data that has already been indexed for the field - or add data that isn't in existing documents, but is present in your original data source.
As long as the content is only meant to be present in any document being indexed after you've updated your schema, adding a dynamic or static field does not require reindexing.
If the field has already been indexed under a different type, clearing out the index and reindexing is a necessity (although you might get away with doing atomic updates if all existing fields are set as stored - but I really recommend doing a full reindex in that case anyway, since you don't want your index to be in some sort of limbo while updates are being performed).
Upvotes: 1