lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (SOLR-1695) Missleading error message when adding docs with missing/multiple value(s) for uniqueKey field
Date Thu, 18 Feb 2010 19:04:27 GMT


Hoss Man commented on SOLR-1695:


Note to self: don't just run the tests, remember to look at the results as well.

The DocumentBuilderTest failures make sense: they use a schema with uniqueKey defined, but
add docs w/o that field to test other behaviors of toDocument.  They passed prior to this
change because the only tested to toDocument method in isolation, andthe test for a missing
uniqueKey was missing from that method.  I think it's safe to consider these tests broken
as written, since toDocument does do schema validation -- it just wasn't doing the uniqueKey
validation before.  So i'll modify those tests to include a value for the uniqueKey field

the ConvertedLegacyTest failure confuses me though ... it also adds docs w/o a uniqueKey field
even though the schema requires one, but they do full adds so it's not obvious from the surface
why it was ever passing before ... i want to think about that a little more before just "fixing'
the test -- it may be masking another bug.

>  Missleading error message when adding docs with missing/multiple value(s) for uniqueKey
> ----------------------------------------------------------------------------------------------
>                 Key: SOLR-1695
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 1.5
> Sometimes users don't seem to notice/understand the <uniqueKey/> declaration in
the example schema, and the error message they get if their documents don't include that field
is confusing...
> {code}
> org.apache.solr.common.SolrException: Document [null] missing required field: id
> {code}
> ...because they get an almost identical error even if they remove {{required=true}} from
{{<field name="id" />}} in their schema.xml file.
> We should improve the error message so it's clear when a Document is missing the "uniqueKeyField"
(not just a "required" field) so they know the terminology to look for in diagnosing the problem.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message