Hi Liu; Yes. it is an expected behavior. If you send data within square brackets Solr will behave it as a multivalued field. You can test it with this way: if you use Solrj and use a List for a field it will be considered as multivalued too because when you call toString() method of your List you can see that elements are printed within square brackets. This is the reason that a List can be used for a multivalued field.
If you explain your situation I can offer a way how to do it. Thanks; Furkan KAMACI 2013/12/6 Liu Bo <diabl...@gmail.com> > Dear solr users: > > I've met this kind of error several times, > > when add a "array" liked string such as:[Get 20% Off Official Barça Kits, > coupon] to a multiValued="false" field, solr will complain: > > org.apache.solr.common.SolrException: ERROR: [doc=7781396456243918692] > multiple values encountered for non multiValued field name_en_US: [Get 20% > Off Official Barca Kits, coupon] > > my schema defination: > <field name="name_en_US" type="text_en" indexed="true" stored="true" > multiValued="false" /> > > This field is stored as the search result needs this field and it's value > in original format, and indexed to give it a boost while searching . > > What I do is adding name (java.lang.String) to SolrInputDocument by > addField("name_en_US", product.getName()) method, and then add this to solr > using an AddUpdateCommand > > It seems solr treats this kind of string data as multivalued, even I add > this field to solr only once. > > Is this a bug or a supposed behavior? > > Is there any way to tell solr this is not a "multivalued value" add don't > break it? > > Your help and suggestion will be much of my appreciation. > > -- > All the best > > Liu Bo >