Re: Spatial search in Solr 1.5
I just upgraded to a later version of the trunk and noticed my geofilter queries stopped working, apparently because the sfilt function was renamed to geofilt. I realize trunk is not stable, but other than looking at every change, is there an easy way to find changes that are not backward compatible so developers know what they need to update when upgrading? Thanks, Scott On Tue, Oct 12, 2010 at 17:42, Yonik Seeley wrote: > On Tue, Oct 12, 2010 at 8:07 PM, PeterKerk wrote: >> >> Ok, so does this actually say: >> for now you have to do calculations based on bounding box instead of great >> circle? > > I tried to make the documentation a little simpler... there's > - geofilt... filters within a radius of "d" km (i.e. "great circle > distance") > - bbox... filters using a bounding box > - geodist... function query that yields the distance (again, "great > circle distance") > > If you point out the part to the docs you found confusing, I can try > and improve it. > Did you try and step through the quick start? Those links actually work! > >> And the fact that on top of the page it says "Solr4.0", does that imply I >> cant use this right now? Or where could I find the latest trunk for this? > > The wiki says "If you haven't already, get a recent nightly build of > Solr4.0"... > and links to the Solr4.0 page, which points to > http://wiki.apache.org/solr/FrontPage#solr_development > for nightly builds. > > -Yonik > > http://www.lucidimagination.com >
Re: Spatial search in Solr 1.5
ArggghhhI was working in OLD data-config...it now works! :) Thanks, this is a GREAT addition. I do like to know when the final implementation of this feature is implemented (as I understood it might change in the final release). Which issue can I subscribe to, to be informed? Thanks again!!! -- View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1695051.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search in Solr 1.5
On Wed, Oct 13, 2010 at 10:06 AM, PeterKerk wrote: > > haha ;) > > But so I DO have the right solr version? > > Anyways...I have added the lines you mentioned, what else can I do? The fact that the geolocation field does not show up in the results means that it's not getting added (i.e. something is probably wrong with your DIH config). -Yonik http://www.lucidimagination.com
Re: Spatial search in Solr 1.5
haha ;) But so I DO have the right solr version? Anyways...I have added the lines you mentioned, what else can I do? Thanks again! -- View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1694683.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search in Solr 1.5
On Wed, Oct 13, 2010 at 9:42 AM, PeterKerk wrote: > Im now thinking I downloaded the wrong solr zip, I tried this one: > https://hudson.apache.org/hudson/job/Solr-trunk/lastSuccessfulBuild/artifact/trunk/solr/dist/apache-solr-4.0-2010-10-12_08-05-48.zip > > In that example scheme > (\apache-solr-4.0-2010-10-12_08-05-48\example\example-DIH\solr\db\conf\schema.xml) > nothing is mentioned about a fieldtype of class solr.LatLonType. Ah, right - DIH has a separate schema. Blech. -Yonik http://www.lucidimagination.com
Re: Spatial search in Solr 1.5
Im now thinking I downloaded the wrong solr zip, I tried this one: https://hudson.apache.org/hudson/job/Solr-trunk/lastSuccessfulBuild/artifact/trunk/solr/dist/apache-solr-4.0-2010-10-12_08-05-48.zip In that example scheme (\apache-solr-4.0-2010-10-12_08-05-48\example\example-DIH\solr\db\conf\schema.xml) nothing is mentioned about a fieldtype of class solr.LatLonType. But when I add the lines you suggested to my current schema.xml, I get no error, so apparently the LatLonType IS found? Here's what I now have in my schema.xml and this url: http://localhost:8983/solr/db/select/?wt=xml&indent=on&facet=true&fl=id,title,lat,lng,city&facet.field=province_raw&q=*:*&fq={!geofilt%20pt=51.8316819,5.8151540%20sfield=geolocation%20d=500} I also tried this: http://localhost:8983/solr/db/select/?wt=xml&indent=on&facet=true&fl=id,title,lat,lng,geolocation,city&facet.field=province_raw&q=*:* So WITHOUT the geofilter. Strange thing there is that the geolocation field does not show up in the results (even though I restarted my app server, reloaded my data-config and did a full import) -- View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1694443.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search in Solr 1.5
Does the spatial constraints for laton types work for multivalued latlon fields? Is there an example of it? using a field conjunction with > < operators didn't work, last I checked. > On Wed, Oct 13, 2010 at 7:28 AM, PeterKerk wrote: >> Hi, >> >> Thanks for the quick reply :) >> >> I downloaded the latest version from the trunk. Got it up and running, >> and >> got the error below: > > Hopefully the QuickStart on the wiki all worked for you, > but you only got the error when customizing your own config? > > Anyway, it looks like you haven't defined a _latLon dynamic field type > for the lat / lon components. > > Here's what is in the example schema: > > subFieldSuffix="_coordinate"/> > stored="false"/> > > > > -Yonik > http://www.lucidimagination.com > >> URL: >> http://localhost:8983/solr/db/select/?wt=xml&indent=on&facet=true&fl=id,title,lat,lng,city&facet.field=province_raw&q=*:*&fq={!geofilt%20pt=45.15,-93.85%20sfield=geolocation%20d=5} >> >> HTTP ERROR 400 >> >> Problem accessing /solr/db/select/. Reason: >> >> undefined field geolocation_0_latLon >> >> Powered by Jetty:// >> >> >> >> My field definition is: >> >> I added this in schema.xml: >> >> > subFieldSuffix="_latLon"/> >> >> >> data-config.xml: >> >> >> >> >> >> I looked in the schema.xml of the latest download, but it turns out in >> the >> download there's nothing defined in that schema.xml on "latLon" type >> either. >> >> Any suggestions what im doing wrong? >> >> Thanks! >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1693797.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> >
Re: Spatial search in Solr 1.5
On Wed, Oct 13, 2010 at 7:28 AM, PeterKerk wrote: > Hi, > > Thanks for the quick reply :) > > I downloaded the latest version from the trunk. Got it up and running, and > got the error below: Hopefully the QuickStart on the wiki all worked for you, but you only got the error when customizing your own config? Anyway, it looks like you haven't defined a _latLon dynamic field type for the lat / lon components. Here's what is in the example schema: -Yonik http://www.lucidimagination.com > URL: > http://localhost:8983/solr/db/select/?wt=xml&indent=on&facet=true&fl=id,title,lat,lng,city&facet.field=province_raw&q=*:*&fq={!geofilt%20pt=45.15,-93.85%20sfield=geolocation%20d=5} > > HTTP ERROR 400 > > Problem accessing /solr/db/select/. Reason: > > undefined field geolocation_0_latLon > > Powered by Jetty:// > > > > My field definition is: > > I added this in schema.xml: > > > > > data-config.xml: > > > > > > I looked in the schema.xml of the latest download, but it turns out in the > download there's nothing defined in that schema.xml on "latLon" type either. > > Any suggestions what im doing wrong? > > Thanks! > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1693797.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: Spatial search in Solr 1.5
Hi, Thanks for the quick reply :) I downloaded the latest version from the trunk. Got it up and running, and got the error below: URL: http://localhost:8983/solr/db/select/?wt=xml&indent=on&facet=true&fl=id,title,lat,lng,city&facet.field=province_raw&q=*:*&fq={!geofilt%20pt=45.15,-93.85%20sfield=geolocation%20d=5} HTTP ERROR 400 Problem accessing /solr/db/select/. Reason: undefined field geolocation_0_latLon Powered by Jetty:// My field definition is: I added this in schema.xml: data-config.xml: I looked in the schema.xml of the latest download, but it turns out in the download there's nothing defined in that schema.xml on "latLon" type either. Any suggestions what im doing wrong? Thanks! -- View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1693797.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search in Solr 1.5
On Tue, Oct 12, 2010 at 8:07 PM, PeterKerk wrote: > > Ok, so does this actually say: > for now you have to do calculations based on bounding box instead of great > circle? I tried to make the documentation a little simpler... there's - geofilt... filters within a radius of "d" km (i.e. "great circle distance") - bbox... filters using a bounding box - geodist... function query that yields the distance (again, "great circle distance") If you point out the part to the docs you found confusing, I can try and improve it. Did you try and step through the quick start? Those links actually work! > And the fact that on top of the page it says "Solr4.0", does that imply I > cant use this right now? Or where could I find the latest trunk for this? The wiki says "If you haven't already, get a recent nightly build of Solr4.0"... and links to the Solr4.0 page, which points to http://wiki.apache.org/solr/FrontPage#solr_development for nightly builds. -Yonik http://www.lucidimagination.com
Re: Spatial search in Solr 1.5
Ok, so does this actually say: for now you have to do calculations based on bounding box instead of great circle? And the fact that on top of the page it says "Solr4.0", does that imply I cant use this right now? Or where could I find the latest trunk for this? (and ofcourse this might all change when the final solr version comes out that supports this functionality) -- View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1691399.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search in Solr 1.5
You may want to check the docs, which were recently updated to reflect the state of trunk: http://wiki.apache.org/solr/SpatialSearch -Yonik http://www.lucidimagination.com On Tue, Oct 12, 2010 at 7:49 PM, PeterKerk wrote: > > Hey Grant, > > Just came accross this post of yours. > > Run a query: http://localhost:8983/solr/select/?q=_val_:"recip(dist(2, > store, vector(34.0232,-81.0664)),1,1,0)"&fl=*,score // Note, I just updated > this, it used to be point instead of vector and that was wrong. > > What does your suggested query actually do? > > I really need great circle calcucation. Dont care if its from the trunk, as > long as I can have it in my projects asap :) > > Thanks ahead! > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1691361.html > Sent from the Solr - User mailing list archive at Nabble.com. >
Re: Spatial search in Solr 1.5
Hey Grant, Just came accross this post of yours. Run a query: http://localhost:8983/solr/select/?q=_val_:"recip(dist(2, store, vector(34.0232,-81.0664)),1,1,0)"&fl=*,score // Note, I just updated this, it used to be point instead of vector and that was wrong. What does your suggested query actually do? I really need great circle calcucation. Dont care if its from the trunk, as long as I can have it in my projects asap :) Thanks ahead! -- View this message in context: http://lucene.472066.n3.nabble.com/Spatial-search-in-Solr-1-5-tp489948p1691361.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Spatial search in Solr 1.5
On Mar 15, 2010, at 11:36 AM, Jean-Sebastien Vachon wrote: > Hi All, > > I'm trying to figure out how to perform spatial searches using Solr 1.5 (from > the trunk). > > Is the support for spatial search built-in? Almost. Main thing missing right now is filtering. There are still ways to do spatial filtering, but it isn't complete yet. In the meantime, range queries and or frange might help. > because none of the patches I tried could be applied to the source tree. > If this is the case, can someone one tell me how to configure it? http://wiki.apache.org/solr/SpatialSearch has most of the docs, but they aren't complete yet. Here's what I would do: Check out latest Solr Build the example: ant clean example Start the example: cd example; java -jar start.jar Rebuild the index: cd exampledocs; java -jar post.jar *.xml Run a query: http://localhost:8983/solr/select/?q=_val_:"recip(dist(2, store, vector(34.0232,-81.0664)),1,1,0)"&fl=*,score // Note, I just updated this, it used to be point instead of vector and that was wrong. Next, have a look at the docs in exampledocs and specifically the store field, which contains the location. Then go check out the schema for that field. HTH, Grant -- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search
Spatial search in Solr 1.5
Hi All, I'm trying to figure out how to perform spatial searches using Solr 1.5 (from the trunk). Is the support for spatial search built-in? because none of the patches I tried could be applied to the source tree. If this is the case, can someone one tell me how to configure it? I find the available information very confusing so I hope someone will be able to give me some hints... Thanks