Re: Spatial search in Solr 1.5

2010-11-11 Thread Scott K
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 yo...@lucidimagination.com wrote:
 On Tue, Oct 12, 2010 at 8:07 PM, PeterKerk vettepa...@hotmail.com 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

2010-10-13 Thread PeterKerk

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=xmlindent=onfacet=truefl=id,title,lat,lng,cityfacet.field=province_rawq=*:*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:
field name=geolocation type=latLon indexed=true stored=true/
fieldType name=latLon class=solr.LatLonType subFieldSuffix=_latLon/


data-config.xml: 
entity name=location_geolocations query=select (lat+','+lng) as geoloc
FROM locations WHERE id='${location.id}'
field name=geolocation column=geoloc  /
/entity


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

2010-10-13 Thread Yonik Seeley
On Wed, Oct 13, 2010 at 7:28 AM, PeterKerk vettepa...@hotmail.com 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:

   fieldType name=location class=solr.LatLonType
subFieldSuffix=_coordinate/
   dynamicField name=*_coordinate  type=tdouble indexed=true
stored=false/

   field name=store type=location indexed=true stored=true/

-Yonik
http://www.lucidimagination.com

 URL:
 http://localhost:8983/solr/db/select/?wt=xmlindent=onfacet=truefl=id,title,lat,lng,cityfacet.field=province_rawq=*:*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:
 field name=geolocation type=latLon indexed=true stored=true/
 fieldType name=latLon class=solr.LatLonType subFieldSuffix=_latLon/


 data-config.xml:
 entity name=location_geolocations query=select (lat+','+lng) as geoloc
 FROM locations WHERE id='${location.id}'
        field name=geolocation column=geoloc  /
 /entity


 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

2010-10-13 Thread darren
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 vettepa...@hotmail.com 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:

fieldType name=location class=solr.LatLonType
 subFieldSuffix=_coordinate/
dynamicField name=*_coordinate  type=tdouble indexed=true
 stored=false/

field name=store type=location indexed=true stored=true/

 -Yonik
 http://www.lucidimagination.com

 URL:
 http://localhost:8983/solr/db/select/?wt=xmlindent=onfacet=truefl=id,title,lat,lng,cityfacet.field=province_rawq=*:*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:
 field name=geolocation type=latLon indexed=true stored=true/
 fieldType name=latLon class=solr.LatLonType
 subFieldSuffix=_latLon/


 data-config.xml:
 entity name=location_geolocations query=select (lat+','+lng) as
 geoloc
 FROM locations WHERE id='${location.id}'
        field name=geolocation column=geoloc  /
 /entity


 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

2010-10-13 Thread PeterKerk

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

fieldType name=location class=solr.LatLonType
subFieldSuffix=_coordinate/  
dynamicField name=*_coordinate  type=tdouble indexed=true
stored=false/
field name=geolocation type=location indexed=true stored=true/

and this url:
http://localhost:8983/solr/db/select/?wt=xmlindent=onfacet=truefl=id,title,lat,lng,cityfacet.field=province_rawq=*:*fq={!geofilt%20pt=51.8316819,5.8151540%20sfield=geolocation%20d=500}


I also tried this:
http://localhost:8983/solr/db/select/?wt=xmlindent=onfacet=truefl=id,title,lat,lng,geolocation,cityfacet.field=province_rawq=*:*

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

2010-10-13 Thread Yonik Seeley
On Wed, Oct 13, 2010 at 9:42 AM, PeterKerk vettepa...@hotmail.com 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

2010-10-13 Thread PeterKerk

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

2010-10-13 Thread Yonik Seeley
On Wed, Oct 13, 2010 at 10:06 AM, PeterKerk vettepa...@hotmail.com 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

2010-10-13 Thread PeterKerk

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

2010-10-12 Thread PeterKerk

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

2010-10-12 Thread Yonik Seeley
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 vettepa...@hotmail.com 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

2010-10-12 Thread PeterKerk

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

2010-10-12 Thread Yonik Seeley
On Tue, Oct 12, 2010 at 8:07 PM, PeterKerk vettepa...@hotmail.com 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

2010-03-16 Thread Grant Ingersoll

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

2010-03-15 Thread Jean-Sebastien Vachon
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