On 2022-12-14 10:45 AM, Matthew Castrigno wrote:
Hi Gus,
Thank you for your reply. I am trying to emulate an existing API that is why I
am trying to work with the Zipcode directly. After looking at this it looks
like I will have to do a few things.
1. When indexing I will need to index the location in a spatial field <fieldType name="location"
class="solr.LatLonPointSpatialField" docValues="true"/>
2. Along with the zipcode (in case just a straight zipcode match is
desired) I will have to lookup the GPS coordinates of the zipcode and pass them
as the pt parameter.
3. Finally, I will need to use the functional query geodist() to return a
field that will be the distance from the location in item 1 and the pt
parameters in item 2.
The point of the url I send earlier is that zipcodes are weird irregular
shapes that don't work well with regular spatial queries. I.e. there is
no such thing as "GPS coordinates of the zipcode" (#2).
Dima