I'm trying to set up Solr Geospatial searching in my application. The model is that I've got customer with multiple addresses, and I want to tag that customer with each address geocode, then search for customers within a distance from a center point.
It works okay with one geocode. Here is what I have in schema so far for multiple geocodes per solr entry:
In Schema.xml
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="true"/>
...
<field name="latlng" type="location" indexed="true" stored="true" multiValued="true" />
This is fine, although when I query the docs through SOLR admin I can only see the values for the individual coordinate fields, not for the location. Is there a way I can fix that bit?
But the bigger problem is that when I execute this SOLR query:
http://localhost:8983/solr/aust/select?q=*:*&fq={!geofilt pt=-37.8064822,144.96090520000007 sfield=latlng d=15}&wt=json&indent=true
It errors with:
"can not use FieldCache on multivalued field: latlng_0_coordinate"
I believe this is caused by trying to execute a filter query against a multi-valued attribute generally.
I tried this from the solr admin panel:
http://localhost:8983/solr/aust/select?q=*:*&wt=json&indent=true&spatial=true&pt=-27.516473,152.95089480000001&sfield=latlng&d=20
but it just returns all documents...
So I was wondering if there's an alternative way to query against a multi-valued location parameter?