http://yonik.com/solr/atomic-updates/express
Solr supports several modifiers that atomically update values of a document.atom
set
– set or replace a particular value, or remove the value if null
is specified as the new valueadd
– adds an additional value to a listremove
– removes a value (or a list of values) from a listremoveregex
– removes from a list that match the given Java regular expressioninc
– increments a numeric value by a specific amount (use a negative value to decrement)Note: All original source fields must be stored for field modifiers to work correctly. This is the default in Solr.spa
[ {"id" : "book1", "author_s" : {"set":"Neal Stephenson"}, "copies_i" : {"inc":3}, "cat_ss" : {"add":"Cyberpunk"} } ]