O'Reilly logo

Instant Apache Solr for Indexing Data How-to by Alexandre Rafalovitch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Atomic updates (Intermediate)

Solr did not used to be at all like a database. It was designed to excel at searching, leaving data storage and rapid in-place updates to regular databases. However, with new features in Version 4, such as soft commits and other Near Real Time optimizations, Solr can substitute a database in previously impossible scenarios. Partial record (Atomic) update is also one of these features. It allows sending only changed document fields to Solr as part of the add/update command and having them merged with already known values for other fields of the same document.

How to do it...

  1. Copy and rename the commit directory to the update directory, delete the data directory, and add the core reference to update in solr.xml.
  2. In schema.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required