
SOLR GEODIST DOWNLOAD
To setup geonames, download the database (allcountries.txt) and import into the Solr.įire the query: Note: The query includes 'score=distance' and 'sort=score' to include distance in the response. If you are planning to import data from mysql, download the mysql connector into solr-webapp/webapp/WEB-INF/lib.Score private Double score This solution works, but I know theres a better way that actually for me doesnt work, see this link. ERROR .CoreContainer – null:: com/vividsolutions/jts/geom/Geometry Moreover I added to my solr document 'score' attribute, used to store distance value calculated by geodist function.Without this, you would get the following error:.Download jts-1.8.jar into solr-webapp/webapp/WEB-INF/lib.SolrException: org/apache/lucene/queryParser/ParseException If you have this enabled in Solr 4.x and used 3.x types, you should see the following error - Unable to create core: collection1.So disable the following in the solrconfig.xml.

Solr 4.x supports alternative geospatial method. SOLR2155 is only for Solr 3.x and it doesnt work on 4.3.The following changes are done to make my Solr 4.x installation: This is consolidation of information collected from various forums to setup spatial search on Solr 4.3 successfully. To setup Solr 4.x for spatial search, I followed the instructions at, but still ran into issues. When I bounce Solr between changing the sfield from 'home' to 'work', it seems to work as expected. Search API Location covers a lot of the ground, but out of the box it only works for single-value location fields provided by the Geofield module. HOLD THE PRESSES: After looking at this a bit more, it looks like a caching issue, NOT a geodist issue. Recent versions of Solr support proximity search on multi-value geo fields, but no Drupal module I could find takes advantage of that capability.

I checked this on 3.4 and trunk and it's weird in both cases.

However our product use cases required relevancy tuning and boosting of certain geonames place types, so we decided to setup Solr. 'Regarding geodist and multiple location fields' outlines this. We had few options to do this instead of deploying our own geo mapping service such as geonames webservice. It can store coordinates in two different field types: solr.PointType for n-dimensional points, and solr.LatLonType for a two-dimensional point for geospatial search. One of my projects required a spatial search using geonames to match cities across multiple local data sources. Since version 3.1, Solr has support for spatial search, including geospatial search.
