Hi Leila,
I haven’t been using spatial in a while and did not test this, but based on 
error, it seems that multivalue is not supported for this field type. Can you 
index a single MULTIPOLYGON? Why do you need to have multiple values? Can you 
flat your geometry to a single MULTIPOLYGON or MULTIGEOMETRY (if supported)? 
Can you explain why do you need to have multiValued field?

Thanks,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 17 Jan 2018, at 00:09, Leila Deljkovic <leila.deljko...@koordinates.com> 
> wrote:
> 
> Hi all,
> 
> I need to index multiple POLYGONS/MULTIPOLYGONS per document; I’m trying to 
> use multiValued RptWithGeometrySpatialField and I’m getting this error:
> 
> Exception writing document id leila_test to the index; possible analysis 
> error: DocValuesField "gridcell_rpt" appears more than once in this document 
> (only one value is allowed per field)
> 
> This is what I’m indexing:
> {
>       "id": "leila_test",
>       "gridcell_rpt": ["POLYGON((30 10, 10 20, 20 40, 40 40, 30 10))”, 
> "MULTIPOLYGON(((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 
> 5)))"]
> }
> 
> This is what’s in my schema.xml:
>       <field name=“gridcell_rpt” type=“location_rpt” multiValued=“true” />
>       …
>       <fieldType name=“location_rpt” class="solr.RptWithGeometrySpatialField”
>       
> spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
>   
>       distanceUnits=”kilometers” autoIndex="true”/>
> 
> I’m pretty confused on why this isn’t working. I can’t find an example of 
> multiValued RptWithGeometrySpatialField anywhere -_-
> 
> Thanks :)

Reply via email to