You have to provide some more details to get meaningful help. You say "I was trying to use boosting". How? At index time? Search time? Both? Can you provide some code snippets? What does your schema look like for the relevant field(s)?
You say "but seems not working right". What does that mean? No hits? Hits not ordered as you expect? Have you tried putting "&debugQuery=on" on your URL and examined the return values? Have you looked at your index with the admin page and/or Luke to see if the data in the index is as you expect? As far as I know, boosts are multiplicative. So boosting by a value less than 1 will actually decrease the ranking. But see the Lucene scoring, See: http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/search/Similarity.html And remember, that boosting will *tend* to move a hit up or down in the ranking, not position it absolutely. HTH Erick On Wed, Mar 3, 2010 at 8:13 PM, Jianbin Dai <j...@huawei.com> wrote: > Hi, > > I am trying to use solr for a content match application. > > A content is described by a set of keywords with weights associated, eg., > > C1: fruit 0.8, apple 0.4, banana 0.2 > C2: music 0.9, pop song 0.6, Britney Spears 0.4 > > Those contents would be indexed in solr. > In the search, I also have a set of keywords with weights: > > Query: Sports 0.8, golf 0.5 > > I am trying to find the closest matching contents for this query. > > My question is how to index the contents with weighted scores, and how to > write search query. I was trying to use boosting, but seems not working > right. > > Thanks. > > Jianbin > > >