This came up on the users list today. Claudio Devecchi defined a date field
in his schema. His XML document had an empty field <field
name="lastsignindate"></field> which caused a SOLR exception. Is it intended
that SOLR treats an empty field differently from it simply not being sent at
all? Or is this just a consequence of how it's coded?

I can argue both ways pretty easily. On the one hand the presence of a field
in the XML implies that a it was sent intentionally and any anomalies should
generate errors. On the other hand the user may not always control how the
xml is produced. I can think of situations pretty easily where I'd want
empty fields just omitted as though they were never sent.

Of course if this were the default, it would change the behavior from what
it is currently, but would anyone notice?

I suppose it could be optional, something like "discardemptyfields=true".
(SOMEBODY come up with a better name).

Mostly, I'm asking this to see if this is intended behavior or not. I can
always raise a JIRA.

Erick

Reply via email to