Look in the Solr log - the error message should tell you what the multiple
values are. For example,
95484 [qtp2998209-11] ERROR org.apache.solr.core.SolrCore –
org.apache.solr.common.SolrException: ERROR: [doc=doc-1] multiple values
encountered for non multiValued field content_s: [def, abc]
One of the values should be the value of the field that is the source of the
copyField. Maybe the other value will give you a clue as to where it came
from.
Check your SolrJ code - maybe you actually do try to initialize a value in
the field that is the copyField target.
-- Jack Krupansky
-----Original Message-----
From: Robert Krüger
Sent: Wednesday, June 05, 2013 1:17 PM
To: solr-user@lucene.apache.org
Subject: Re: copyField generates "multiple values encountered for non
multiValued field"
OK, I have two fields defined as follows:
<field name="name" type="string" indexed="true" stored="true"
multiValued="false" />
<field name="name2" type="string_ci" indexed="true"
stored="true" multiValued="false" />
and this copyField directive
<copyField source="name" dest="name2"/>
I updated the Index using SolrJ and got the exact same error message
that is in the subject. However, while waiting for feedback I built a
workaround at the application level and now reconstructing the
original state, to be able to answer you, I have different behaviour.
What happens now is that the field "name2" is populated with multiple
values although it is not defined as multiValued (see above).
Although this is strange, it is consistent with the earlier problem in
that copyField does not seem to overwrite the existing field values. I
may be using it incorrectly (it's the first time I am using copyField)
but the docs in the wiki did not say anything about an overwrite
option.
Cheers,
Robert
On Wed, Jun 5, 2013 at 5:16 PM, Jack Krupansky <j...@basetechnology.com>
wrote:
Try describing your own symptom in your own words - because his issue
related to Solr 1.4. I mean, where exactly are you setting
"allowDuplicates=false"?? And why do you think it has anything to do with
adding documents to Solr? Solr 1.4 did not have atomic update, so sending
the exact same document twice would not result in a change in the index
(unless you had a date field with a value of "NOW".) Copy field only uses
values from the current document.
-- Jack Krupansky
-----Original Message----- From: Robert Krüger
Sent: Wednesday, June 05, 2013 10:37 AM
To: solr-user@lucene.apache.org
Subject: copyField generates "multiple values encountered for non
multiValued field"
I have the exact same problem as the guy here:
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201105.mbox/%3C3A2B3E42FCAA4BF496AE625426C5C6E4@Wurstsemmel%3E
AFAICS he did not get an answer. Is this a known issue? What can I do
other than doing what copyField should do in my application?
I am using solr 4.0.0.
Thanks,
Robert