Book Image

Apache Solr High Performance

By : Surendra Mohan
Book Image

Apache Solr High Performance

By: Surendra Mohan

Overview of this book

Table of Contents (14 chapters)

Bulk updating a single field without full indexation


You might be aware that if you wish to update a field in a document that is written in the index, in the standard manner, Solr won't allow you. Instead, you need to remove the complete document from the index and add a new version to it. For a smaller index, the standard approach is quite fine. But think of a situation where you have a huge index and you need to update a field that tracks the visitor count hitting the product.

As a standard approach, it is as good as a full indexation of all the documents (probably millions of documents on a daily basis). Do you think full indexation in such a scenario is an optimal approach? Of course not, due to the fact that it is going to utilize ample resources and is better to be avoided. So, how does one handle such a situation? Don't worry! In this section, we will learn how to update a single field in a document without any need for an expensive, complete indexation.

We will refer to our music...