lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leila Deljkovic <leila.deljko...@koordinates.com>
Subject Solr 7 spatial search and WKT
Date Tue, 16 Jan 2018 23:09:23 GMT
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 :)
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message