How atomic or partial update work?

杀马特。学长 韩版系。学妹 提交于 2021-02-10 20:39:34

问题


Solr provide feature to update document partially and it allows to update on a field level rather than on a document level.
Does solr internally fetch entire document and full reindex it? would be great if someone can explain how partial update works internally?


回答1:


Starting from solr 4, Solr allows updating partial documents. You can update the value of a field(s) or add/remove values from a multi valued field.

The best practice while using the partial updates or atomic updates in solr is, you define all the indexing fields in schema as stored=true. When a partial update happen on a document, Solr internally fetches the values for other fields from the previously stored document for reconstructing the document. Then it marks the previous document as deleted and index the new document with higher version.

The advantage is, you need not to send the large document again, if you want to update a specific small field from the index.

The down side of using partial update feature could be larger size of index. Because previously, you might just want to index certain fields without storing them. That will save the space of storing those fields. Now all the indexing fields should be marked as stored=true in schema. That will increase the size of the index on solr.



来源:https://stackoverflow.com/questions/34643351/how-atomic-or-partial-update-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!