Thank you very much Hoss, I knew I was doing something stupid. I will
change the dynamic fields to stored="false" and check it out.

Thanks

Ravi Kiran Bhaskar

On Wed, Oct 10, 2012 at 3:02 PM, Chris Hostetter
<hossman_luc...@fucit.org> wrote:
> :         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
>
> When you use the LatLonType field type you get "synthetic" *_coordinate"
> fields automicaly constructed under the covers from each of your fields
> that use a "latlon" fieldType.  because you have configured the
> "*_coordinate" fields to be "stored" they are included in the response
> when you request the doc.
>
> this means that unless you explicitly remove those synthetically
> constructed values before "reindexing", they will still be there in
> addition to the new (posisbly redundent) synthetic values created while
> indexing.
>
> This is why the "*_coordinate" dynamicField in the solr example schema.xml
> is marked 'stored="false"' so that this field doesn't come back in the
> response -- it's not ment for end users.
>
>
> : <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
> :
>
> -Hoss

Reply via email to