Gopal I did in fact test the same and it worked when I delete ted the
geolocation_0_coordinate and geolocation_1_coordinate. But that seems
weird, so I was thinking if there is something else I need to do to
avoid doing this awkward workaround.

Ravi Kiran Bhaskar

On Wed, Oct 10, 2012 at 12:36 PM, Gopal Patwa <gopalpa...@gmail.com> wrote:
> You need remove field after read solr doc,  when u add new field it will
> add to list,  so when u try to commit the update field,  it will be multi
> value and in your schema it is single value
> On Oct 10, 2012 9:26 AM, "Ravi Solr" <ravis...@gmail.com> wrote:
>
>> Hello,
>>         I have a weird problem, Whenever I read the doc from solr and
>> then index the same doc that already exists in the index (aka
>> reindexing) I get the following error. Can somebody tell me what I am
>> doing wrong. I use solr 3.6 and the definition of the field is given
>> below
>>
>> <fieldType name="latlong" class="solr.LatLonType"
>> subFieldSuffix="_coordinate"/>
>> <dynamicField name="*_coordinate" type="tdouble" indexed="true"
>> stored="true"/>
>>
>> Exception in thread "main"
>> org.apache.solr.client.solrj.SolrServerException: Server at
>> http://testsolr:8080/solr/mycore returned non ok status:400,
>> message:ERROR: [doc=1182684] multiple values encountered for non
>> multiValued field geolocation_0_coordinate: [39.017608, 39.017608]
>>         at
>> org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:328)
>>         at
>> org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:211)
>>         at com.wpost.search.indexing.MyTest.main(MyTest.java:31)
>>
>>
>> The data in the index looks as follows
>>
>> <str name="geolocation">39.017608,-77.375239</str>
>> <arr name="geolocation_0_coordinate">
>>      <double>39.017608</double>
>>      <double>39.017608</double>
>> </arr>
>> <arr name="geolocation_1_coordinate">
>>     <double>-77.375239</double>
>>     <double>-77.375239</double>
>> </arr>
>>
>> Thanks
>>
>> Ravi Kiran Bhaskar
>>

Reply via email to