On 12/18/2014 1:30 AM, bengates wrote:
> Ok, sorry but the issue was located between my keyboard and my chair.
> 
> The field "_collection_id" is required in the schema and not filled in my
> update request.
> 
> As the exception didn't warn me about any required field, I didn't look at
> this.

The reason it didn't say anything about a required field is that you
have default="" in your schema field definitions, so when it's missing,
that is the value that gets used.  I did not really look at the schema
before, because the exception was understandable but did not say which
field was blank ... so I didn't know which field to look at in the schema.

The blank string is an invalid default for numeric fields.  The default
for that field type should be omitted entirely or set to a real value,
like 0, -1, -2147483648 (for integer), -9223372036854775808 (for long).
 If it were me, I would not have a default value, so that the field is
missing if it is not present in the input document.

Thanks,
Shawn

Reply via email to