Dear list,
 
hope somebody can help me understand/avoid this.
 
I am sending an "add" request with allowDuplicates=false to a Solr 1.4.1
instance.
This is for debugging purposes, so I am sending the exact same data that are
already stored in Solr's index.
I am using the PHP PECL libraries, which fail completely in giving me any
hint on what goes wrong.

Only sending the same "add" request again gives me a proper
"SolrClientException" that hints:
 
ERROR: [288400] multiple values encountered for non multiValued field
"field2" [fieldvalue, fieldvalue]

The scenario:
- "field1" is implicitly single value, type "text", indexed and stored
- "field2" is generated via a copyField directive in schema.xml, implicitly
single value, type "string", indexed and stored

What appears to happen:
- On the first "add" (SolrClient::addDocuments(array(SolrInputDocument
theDocument))), regular fields like "field1" get overwritten as intended
- "field2", defined with a copyField, but still single value, gets
_appended_ instead
- When I retrieve the updated document in a query and try to add it again,
it won't let me because of the inconsistent multi-value state
- The PECL library, in addition, appears to hit some internal exception
(that it doesn't handle properly) when encountering multiple values for a
single value field. That gives me zero results querying a set that includes
the document via PHP, while the document can be retrieved properly, though
in inconsistent state, any other way.

But: Solr appears to be generating the corrupted state itsself via
copyField?
What's going wrong? I'm pretty confused...

Thank you,
 Alex

Reply via email to