dear Ts experts,

I want to search the scenario mentioned below using thinking sphinx. I
have listed how i am doing it currently, is there a better way?

search requriement : search for italian restaurants near zip code
14896
desired result : display results from zip code 14896 first followed by
results from surrounding areas

My current implementation(it is an extended query, there are more
fields to be searched,i have removed them to make the query simple)

result_one = Items.search "@business:(italian restaurant) @zip_code:
(14896)",:match_mode => :extended
result_two = Items.search "@business:(italian restaurant) @zip_code:
(14897|14898|14899)",:match_mode => :extended

result_three = result_one + result_two(and i have taken care
result_one comes first in the list)

There is no guaranty that the items in 14896 will come first If i do
this:
result_four = Items.search "@business:(italian restaurant) @zip_code:
(14896|14897|14898|14899)",:match_mode => :extended

Is there a way i can combine this in a single search ?

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to