Hi all,
i am facing an issue while trying to update a document.
I am using SolrJ to add/update documents of my collection. The SolrJ
version is 4.0.0 ( but i also tried with the latest 4.4.0 )

I am aware that in multivalue fields i can only add an element but not
remove, in fact for those fields I am overriding all the values every time.
Everything worked great until I found a corner case: empty out a multivalue
field.
In this case values stay there and the field is not emptied.

I tried to look on the previous ML threads and i found something useful
here:
http://www.searchworkings.org/forum/-/message_boards/view_message/585466

Using CURL i posted a JSON update and the field has been emptied. However
when i tried to apply the same solution using SolrJ i didn't get the
expected result.

This is the code snippet:

 Map<String, Object> element = new HashMap<String, Object>(1);
 element.put("set", null);
 this.addField("fieldname", element);

Am I doing something wrong? Did anyone else face the same issue?

Thanks in advance,
Edo

Reply via email to