spring - Solr partial update is not working -


i'm trying make solr partial update working spring data.

solrtemplate solr; // autowired  public void updateentry(final entry entry) {     partialupdate update = new partialupdate("id", entry.getid());     update.add("foo_field", "hohoho");     solr.savebean(update);     solr.commit(); } 

however nothing happens document - field "id" doesn't change. deletion , creation working. ideas appreciated.

i'm doing partial update current project spring data solr , it's working fine. here's code have :

partialupdate partialupdate = new partialupdate("id", "yourid"); partialupdate.setvalueoffield("fieldtoupdate", "value"); solrtemplate.savebean(partialupdate); solrtemplate.commit(); 

be sure have proper solrconfig core : (https://wiki.apache.org/solr/atomic_updates)

you need activate on solrconfig.xml updatelog , in schema.xml need defined _version_ field.


Comments