:
http://wiki.apache.org/solr/FAQ#How_can_I_rebuild_my_index_from_scratch_if_I_change_my_schema.3F
:
: but it is not clear about the times when this is needed. So I wonder, do I
: need to do it after adding a field, removing a field, changing field type,
: changing indexed/stored/multiValue properties? What happens if I don't do
: it, will Solr die?
there is no simple answer to that question ... if you add a field you
don't need to rebuild (unless you want to ensure every doc gets a value
indexed or if you are depending on solr to apply a default value). If you
remove a field you don't need to rebuild (but none of hte space taken up
by that field in the index will be reclaimed, and if it's stored it will
still be included in the response.
Changing a field type is one of the few sitautions where we can
categoricly say you *HAVE* to reindex everything
: Also, the FAQ entry notes that one can delete all documents, change the
: schema.xml file, and then reload the core. Would it be possible to instead
: change schema.xml, reload the core, and then rebuild the index -- in effect
: slowly deleting the old documents, but never ending up with a completely
: empty index? I realize that some weird search results could happen during
: such a rebuild, but that may be preferable to having no search results at
The end result won't be 100% equivilent from an index standpoint -- whne
you delete all solr is actaully able to completely start over with an
empty index, absent all low level metadata about fields that use to exist
-- if you incrementally delete, some of that low level metadata will still
be in the index -- it probably won't be something that will ever affect
you, but it is a distinction.
-Hoss