tags:

views:

79

answers:

2

I know I've seen this and I just can't seem to find it.

I have 2 fields that i am searching on - Name, and Tags. I want results that are based on a match on the "Name" field have a higher score than those based on the "tags" field.

how can I do this?

Thanks

+1  A: 

You can use the boost operator:

title_wa:something^4

if the title matches 'something', then its score will be boosted according to the factor.

Matthias
+2  A: 

Along with boosting during search, you can also boost fields differently during indexing. This means that a general search for a term that could show up in either field would still give a better score for those that match your preferred field without overtly stating where you're looking for the term.

Robert Elwell
This is what I was looking for - do you have the syntax?
I'm more of a Zend Search Lucene guy, but something tells me if you look in the .NET API, you'll find the way to do this. It's a property of the field object, which is then added to the document object. It's probably something as simple as field.setBoost(aNumber) or whatever. Also, if this is what you're looking for, make sure to accept and upvote :)
Robert Elwell