Ralf,

Highlighting (and search relevancy -- the score) is performed on the user query 
which must be in the "q" parameter.  In your case, I see you placed your 
geospatial query there and you put your user query into a filter query "fq".  
You have them reversed.  

You stated that the "returning the distance" information on the wiki didn't 
work -- that's because those instructions are for Solr 4.0 (not released yet) 
-- notice the warning symbol. I recommend that you calculate the distance 
yourself since Solr 4.0 isn't out yet. There is plenty of information on the 
web on how to calculate the distance between two lat-lon points using the 
Haversine algorithm.

~ David

On Aug 1, 2011, at 5:00 PM, Ralf Musick wrote:

> Hi David,
> 
> an example is:
> http://localhost:8983/solr/browse?indent=on&hl=on&hl.fl=name,manu&sort=score+asc&sfield=store&json.nl=map&wt=json&rows=10&start=0&q={!func}geodist%28%29&pt=45.17614%2C-93.87341&fq=%28name%20:+%28canon%29%29^8
> 
> I have to say I need the calculated distance as a return field (score) 
> in the result list.
> The pseudo field solution described here 
> http://wiki.apache.org/solr/SpatialSearch#Returning_the_distance did not 
> word, so I created the query above.
> 
> Thanks,
>  Ralf
> 
> 
> Am 01.08.2011 22:21, schrieb Smiley, David W.:
>> Can you demonstrate the bug against the example data?  If so, provide the 
>> URL please.
>> ~ David
>> 
>> On Aug 1, 2011, at 4:00 PM, Ralf Musick wrote:
>> 
>>> Hi,
>>> 
>>> I combined a spatial distance search with a fulltext search as described
>>> in
>>> http://wiki.apache.org/solr/SpatialSearch#geodist_-_The_distance_function .
>>> I'm using solr 3.3 and that works fine.
>>> BUT, I want to use highlighting of fulltext query words but that does
>>> not work.
>>> 
>>> Before solr 3.3, I used solr 1.4 with Spatial Search plugin from Jteam
>>> and that works fine also with highlighting.
>>> 
>>> After refactoring because of API change I miss the highlighting feature.
>>> 
>>> Is that a known issue? Or what is my mistake/ I have to do?
>>> 
>>> Example Query:
>>> INFO: [organisations] webapp=/solr path=/select
>>> params={hl.fragsize=250&sort=score+asc&sfield=store_lat_lon&json.nl=map&hl.fl=name,category_name&wt=json&hl=on&rows=10&fl=id,name,street,city,score,lat,lng&start=0&q={!func}geodist()&pt=52.5600917,13.4222482&fq=((country_name:+(automatisierung))^8+OR+(category_name:+(automatisierung))^10+OR+(sub_category_name:+(automatisierung))^10}
>>> hits=37 status=0 QTime=7
>>> 
>>> 
>>> Thanks is Advance,
>>>  Ralf
>> 
> 

Reply via email to