I am updating an existing document using the "add-distinct" directive.   One of 
my fields is declared: <field name="ecSys-created" type="plong" indexed="true" 
stored="true" default="NOW"/>
The field being updated is a different field.

All I set in my code is
Map<String, Object> fields = new HashMap<>();
SolrInputDocument solrDoc = new SolrInputDocument();

fields.put("add-distinct", member);

solrDoc.addField("label_id", identifier);
solrDoc.addField("ecSys-label-memberIds", fields);   //this field is 
multi-valued

When I execute the client add I get this error:
Exception writing document id c06fff6c-d586-3586-abea-3d1a2785faba to the 
index; possible analysis error: For input string: "NOW"

The above ecSys-created field is the only one referencing NOW.

My impression is atomic updates affect only fields set in the input document.  
I have a misunderstanding somewhere.  Even more confusing is the above code 
worked earlier and I was able to update the multi-valued field.  I only did a 
little refactoring and added setting the multi-valued with a list.
But that is neither here nor there at moment.

Do I need to remove the NOW default and set it from the client when I first 
create document?

Thanks.

-S

Reply via email to