3
votes

I have a core that have documents with some of fields indexed but not stored (let's call them Group A fields). When I update other fields (indexed and stored, let's call them Group B fields), contents of the Group A fields are lost.

In this Solr documentation, Updating Parts of Documents, "The core functionality of atomically updating a document requires that all fields in your schema must be configured as stored (stored="true") or docValues(docValues="true") except for fields which are destinations, which must be configured as stored="false".

So, I must reindex the whole core every time when I update the Group B fields? Any work around?

1

1 Answers

3
votes

Yes, if you don't want to store the fields, you'll have to reindex them.

An atomic update in Solr is implemented as fetch document, change values for those fields that has changed, and resubmit the document internally. If the values aren't stored, the resubmit will be missing those values.

You don't have to reindex the whole core, just the documents that have changed. But yes, those fields will have to be set as stored or with docvalues as true if you're going to use atomic updates for just certain fields.