Unfortunately, there's not that kind of precise flexibility in Sphinx  
(no idea if it exists in Lucene/Solr or Xapian).

However, you can put weightings on specific fields, so words that  
appear in them will rank higher than words that appear in other  
fields. Not quite the same as exact matches being ranked first, though.

In your define_index block, if you want model-wide defaults:
   set_property :field_weights => {'name' => 10, 'description' => 5}

Or for specific searches:
   Model.search 'query', :field_weights => {'name' => 10,  
'description' => 5}

Any fields that aren't mentioned have a default weight of 1.

-- 
Pat

On 13/08/2009, at 1:01 AM, tashfeen.ekram wrote:

>
> i have a name field that contains names of medical conditions. i would
> like to weight search results that contian the full name and nothing
> else over things that contain the name plus other things. is there any
> easy way to give those a higher weight?
>
> thanks
> >


--~--~---------~--~----~------------~-------~--~----~
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