display result of current country on top

Post Reply
m.alam
Posts: 17
Joined: Fri Nov 23, 2007 9:30 am

display result of current country on top

Post by m.alam »

I want to display search result that will take care of IP Address.I am sending country info to the search query along with user search keywords and want to display results related to user IP on top and rest of all below of that.I have also added "userCountry" column in html table.
1.If I set "Require all words" setting 'Y' in search setting section,only result of that country appears.
2.f I set "Require all words" setting 'N' in search setting section,all result appears but does not appear meaningful search.
Can any body suggest a good idea.
Thanks
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

display result of current country on top

Post by mark »

If you added userCountry to the text search index that should be fairly effective with require all words off. You probably want to place the country as the first item in the index and in the query.

You could require all words but the country by adding a + to the beginning of every term except the country and turn off require all words.
Post Reply