[ 
https://issues.apache.org/jira/browse/SOLR-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ishan Chattopadhyaya updated SOLR-1578:
---------------------------------------

    Attachment: Indexer.java
                solrconfig.xml
                schema.xml
                geocodercomponent_initial.patch

Here's an early patch based on the approach discussed in the talk. This is for 
a geocoding component organized as a SearchComponent.

It uses per-field, in-memory bloom filters to perform quick query 
classification into various hierarchical toponyms in the index. It takes in a 
set of valid geocoding grammar rules (from solrconfig.xml) and for those 
permutations of classifications that pass the grammar rules, it creates boolean 
queries and fires against the index.

I have included a util class Indexer.java to index GeoNames US data into the 
index. 

The patch needs further work to handle queries containing house numbers etc. 
Some queries that work:
http://HOSTNAME:8983/solr/collection1/geocoder?q=pizza%20near%20san%20francisco,%20ca
http://HOSTNAME:8983/solr/collection1/geocoder?q=california
http://HOSTNAME:8983/solr/collection1/geocoder?q=redwood+city

(Please replace HOSTNAME with geocoder.in for a live demo)

[[email protected]], [~dsmiley] and others, please review. Thanks.

> Geocoding Spatial Query Parser
> ------------------------------
>
>                 Key: SOLR-1578
>                 URL: https://issues.apache.org/jira/browse/SOLR-1578
>             Project: Solr
>          Issue Type: New Feature
>          Components: spatial
>            Reporter: Grant Ingersoll
>         Attachments: Indexer.java, geocodercomponent_initial.patch, 
> schema.xml, solrconfig.xml
>
>
> Given all the work around spatial, it would be beneficial if Solr had a query 
> parser for dealing with spatial queries.  For starters, something that used 
> geonames data or maybe even Google Maps API would be really useful.  Longer 
> term, a spatial grammar that can robustly handle all the vagaries of 
> addresses, etc. would be really cool.
> Refs: 
> [1] http://www.geonames.org/export/client-libraries.html (note the Java 
> client is ASL)
> [2] Data from geo names: http://download.geonames.org/export/dump/



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to