Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does SchemaChange need Reindex

Tags:

solr

If a change has been made in Solr Schema configuration, Do we always need to rebuild the Index??

E.g. if I have changed the fieldtype of a field from general_text to string. Do I need to rebuild the whole index, or is there any shortcut?

like image 308
nicck_par Avatar asked Mar 16 '12 13:03

nicck_par


2 Answers

It depends on what you change,

Suppose you change any field name/type definitely this calls for a re index as the data has to be analyzed as per the new applicable analysis pipeline. Same goes true for adding or deleting a field.

However there can be a rare scenario where re-index is not required. The case for this would be if you change query time analysis of a field type only . Since all the applicable analysis changes happen during query time , therefore merely a restart of the solr server is required.

like image 77
Umar Avatar answered Nov 15 '22 15:11

Umar


Changes in schema would require a Reindex of the collection.
You would need to reindex the content as the analysis done at indexing time on the types of the field would be different.
If you don't reindex the Query time analysis performed for the field would be different from the one indexed and no matches would be found.

Also helpful How_can_I_rebuild_my_index_from_scratch_if_I_change_my_schema

like image 38
Jayendra Avatar answered Nov 15 '22 14:11

Jayendra