You may want to do a copyfield and have one field that is stemmed for casual matches at a lower boost while one is unstemmed and boosted higher.

You could also do a copyfield to a non-tokenized field (TextField with KeywordTokenizer and lower case and trim filters) and give a match in that field a much higher boost.

-- Jack Krupansky

-----Original Message----- From: bbarani
Sent: Thursday, October 25, 2012 5:34 PM
To: solr-user@lucene.apache.org
Subject: Re: How to boost exact match?

Thanks a lot for your reply.

Consider the below query

?q=data management&defType=edismax&qf=name^100 text uid^0.3&fl=name

I am trying to boost the name as much as possible, even then the results are
in below order

- <doc>
 <str name="name">MANAGER</str>
 </doc>
- <doc>
 <str name="name">MANAGER</str>
 </doc>
- <doc>
 <str name="name">MANAGERS</str>
 </doc>
- <doc>
 <str name="name">...AA DATA MANAGEMENT</str>
 </doc>
- <doc>
 <str name="name">BA...AA DATA MANAGEMENT</str>

When I turned on the debug query, I figured out that the actual keyword
passed is stemmed due to usage of PorterStemFilterFactory which actually
splits the keyword in to data manag and passes that to search.

I  am using PorterStemFilterFactory for both indexing / query.

I will try to remove the porter stem from query and check if I am getting
proper result.

Thanks.
BB

Thanks,
BB




--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-boost-exact-match-tp4015862p4015915.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to