lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajiv2 <>
Subject Need help with Parsing user Query
Date Wed, 05 Nov 2008 17:42:25 GMT

Hi, I need help with solving a particular problem I'm having. 

I have a one box search website where users can type "cosmetic surgery
houston tx" or "cosmetic surgery 22151". I need to come up with a reliable
way to parse out the geo terms/or zipcodes from the user query so that I can
submit a query to Solr with a serch term and lat/long. For example

Possible solutions are to :

1. Create a custom filter to parse out the terms then match the terms w/ a
long/lat, problems may arrise when dealing with more than one word geo terms
like (new york ny). This method might not be very reliable.

2. Before I execute the query against Solr, parse out the terms and then
submit the non geo query + lat/long to Solr. This may hamper performance.

3. Create another solr index with just geo terms and submit the query first
to that index and use the lat/long from the highest ranking document as the
location (assuming a document in this index contains lat, long, and the geo
term) . Then submit final query to Solr

Does anyone have any other suggestions on how to solve this problem without
using two boxes.

thanks again.
View this message in context:
Sent from the Solr - User mailing list archive at

View raw message