0
votes

I am trying to figure out whether I need to re-index a [very large] document base in Solr in the following scenarios:

  1. I want to add a few new fields to the schema: none of the old Documents need to be updated to add values for these fields, only new documents that I will be adding after the schema update will have these fields. Do I still need to re-index Solr?

  2. I want to remove couple of not-used fields from the schema (they were added prematurely ...): none of the existing documents has any of these fields. Do I still need to re-index the Solr after the schema update?

I saw many recommendations for updating existing documents when adding/modifying fields, but this is not the case for me - I only want to update the schema, not the existing documents.

Thanks!

Marina

1

1 Answers

0
votes

Answer 1: You are correct, you can add new field, you do not need to reindex if you want only new documents going forward to have value for that new field.

Answer 2: Yes, you can remove field without rebuilding index if none of documents have value for that field. You can make sure by looking at that field under:

http://localhost:8080/admin/schema.jsp

If one of documents has value for field you want to remove, you have to rebuild index, else it will give error.