Geo Spatial Search Engine
Wow that's a mouth full, but that's what we've got. Well sort of, I've shown a few folks an extension
Local Solr to include Local Lucene. A weekends worth of work, simple and a quick hack.
Well it's now popular, and again with very little promotion, inside my company, there are currently 2 projects
that are going to get built against it. One of them is pretty big and a household name. Details later ;-)
On top of that, somebody out there, was looking for geospatial solution, found local lucene, just as about 5,000 people have. Looked at my cvs tree, and noticed I had Local Solr in there. So he downloaded it, tried
it and had compile issues, due to using a different version of solr.
After a couple of email's I got the guy going, and created a desktop distribution of local solr to make it easier.
Have a play with this if you want:
solr-example.tgz
unzip it, or untar if your a geek like the rest of us. You need java to run this (no help there, sorry life is short)
I've included a list of new york cinemas for sample data, it's cost me $30 to get that data, so please be nice with your comments :-D
Go to solr-example/apache-solr-1.*/example and run "java -jar start.jar"
All of a sudden you will have a search engine running on your computer, woo hoo. Ohh big red apples.
Now point your browser to http://localhost:8983/localcinema/ (using firefox only, sorry again it's a quick demo) and click "go". Now either drag your map, or specify a more specific NY address or cinema.
If you like and you want to use, I'd appreciate a note letting me know, and recommend you check out Solr.
*Thanks to Andrei for providing me with some corrections*
Local Solr to include Local Lucene. A weekends worth of work, simple and a quick hack.
Well it's now popular, and again with very little promotion, inside my company, there are currently 2 projects
that are going to get built against it. One of them is pretty big and a household name. Details later ;-)
On top of that, somebody out there, was looking for geospatial solution, found local lucene, just as about 5,000 people have. Looked at my cvs tree, and noticed I had Local Solr in there. So he downloaded it, tried
it and had compile issues, due to using a different version of solr.
After a couple of email's I got the guy going, and created a desktop distribution of local solr to make it easier.
Have a play with this if you want:
solr-example.tgz
unzip it, or untar if your a geek like the rest of us. You need java to run this (no help there, sorry life is short)
solr-example/
apache-solr-1.*/
dist/
example/
lib/
data/
ny_cinemas.xml
I've included a list of new york cinemas for sample data, it's cost me $30 to get that data, so please be nice with your comments :-D
Go to solr-example/apache-solr-1.*/example and run "java -jar start.jar"
All of a sudden you will have a search engine running on your computer, woo hoo. Ohh big red apples.
Now point your browser to http://localhost:8983/localcinema/ (using firefox only, sorry again it's a quick demo) and click "go". Now either drag your map, or specify a more specific NY address or cinema.
If you like and you want to use, I'd appreciate a note letting me know, and recommend you check out Solr.
*Thanks to Andrei for providing me with some corrections*
Hey, thanks so much for posting Local Solr example here - this is so cool! The test URL is http://localhost:8983/local..., not "localcinemas".
I have noticed your example is built on Solr 1.1 Have you tested it with Solr 1.2 as well?
Thanks again
Tuesday, October 02, 2007 20:07:48
pjaol says:Hi Andrei, thank you for visiting an correcting me, the answer is I've updated it to the head of solr so 1.3.
The CVS repository is ant based and contains all the necessary components for build it. Obviously supply your own ant.
There are a few fixes in there currently, and if you using localsolr, please download the latest version.
P
Tuesday, October 16, 2007 20:36:31
Oleg Gnatovskiy says:Hey, pjaol! Thanks for posting this! I just checked it out, and I'd like to see how int integrates with the chain collapse project going on with Solr. Since the 1.3 Head is constantly changing, I can't replace the solr jar file included with your local solr, since that causes errors. I was wondering if you still have your 1.1 version that I could take a look at?
Wednesday, January 30, 2008 16:25:14
Daniel Andersson says:Hi Patrick
I've been playing around with Local Solr and it's working well :)
Have run into a few problems (and been unable to find your email address, so hijacking the comments here), which I'm hoping you can help me with.
1. How do I sort by distance?
2. When I specify a radius > 100, it fails with a null pointer. Is this something I can change? (I looked through the configs, found nothing) Or is it hardcoded?
3. The distances-information in the response doesn't contain distances for all the documents that are returned. I'm guessing the ID/key sent in combination with a distance is the unique key specified in schema.xml?
Thanks for your work on Local Solr, much appreciated!
Kind regards,
Daniel
Thursday, February 14, 2008 15:27:56
pjaol says:Hey Daniel
Glad you found localsolr, You might have an old version of the software, the latest code is available from
source forge, http://sourceforge.net/proj...
The subversion repository has the latest version, click on code > svn, for details on checking out the trunk.
The parameters might have changed from the version you have, there is no need for the wt=geoX parameter anymore.
To answer your questions,
1) in the solr/conf/solrconfig.xml, there is a config value _startTier, which for radii over
100 miles, you should set to something like 5. (you'll need to reindex your data)
I'm in the process of writing documentation which details what tiers are.
2) To sort by distance, simply add the parameter "sort=geo_distance asc"
Hope that helps, also check out the mail lists on source forge, there is a locallucene-users, and locallucene-developer
which will keep you upto date with latest developments in the project.
Thanks
Patrick
Monday, February 18, 2008 10:20:05
rhodri says:Hi, great work on LocalSolr, it really is a useful addon. I've been using Solr 1.3-dev and LocalSolr r1.5 and it works really well, however I'm having difficulties using facet on the geo_distance field. I guess because it's not indexed - is there a way around this?
Wednesday, July 02, 2008 07:54:22
Kurt Jarchow says:Do you know if localsolr will work on nightly builds of 1.4 solr? I've had this going on 1.3 but when I upgraded it is giving me a SEVERE: java.lang.NoSuchFieldError when I try to index content.
Monday, February 16, 2009 09:25:45
Mike O-Connor says:kurt: I've been having the same problem. I don't recall where, but I remember an seeing an issue involving that error in Jira
Tuesday, March 10, 2009 11:41:01
jig says:LocalSolr works well from the example. However, I can't find a way to add weighted query-field ratios the same way dismax handler does it. Infact, it seems like "qf" parameter does nothing. Any help would be appreciated.
Tuesday, March 17, 2009 14:14:17
ssn says:Great library, Kudos!!. Queries like the one in example works perfectly fine for me too. But I am having difficulty in applying filters in a query. "fq" parameterts are ignored when the geo SearchHandler (qt=geo) is used. I did a little digging and found “fq” params are considered in LocalSolrQueryComponent process method. So is this a bug or am I missing something in the query? Thanks
Thursday, March 26, 2009 11:43:36
Adam says:This this looks very interesting, thank you for the blog / examples.
I am trying to get this working with the Drupal solr module (http://drupal.org/node/347428) but am having issues with the 'java.lang.NoSuchFieldError ' error when submitting a document as previously mentioned, Drupal are using Solr 1.4 .
Have you any tips on how to go about fixing this or any ideas if a fix is in process?
Saturday, March 28, 2009 21:19:58
TomW says:This works great - but I've noticed that the first geocode query after any update to the index is very slow. Is there any solution to this?
Thursday, April 02, 2009 15:34:22