You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by bengates <be...@aliceadsl.fr> on 2014/12/18 09:30:58 UTC

[Resolved] Exception writing document to the index; possible analysis error.

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.

Thanks anyway,
Ben



--
View this message in context: http://lucene.472066.n3.nabble.com/Exception-writing-document-to-the-index-possible-analysis-error-tp4174845p4174936.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: [Resolved] Exception writing document to the index; possible analysis error.

Posted by Shawn Heisey <ap...@elyograg.org>.
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