When users searches and clicks a result, we store this search keyword in the DB. What we get is a list of keywords for every item with the number of times item was clicked for that keyword.
In solr schema I have multivalued field "keywords". How can I add that number of clicks for every keyword on every item and than boost so the most clicked items are on/near the top of results for that keyword ?
I use dismax and for the moment the query for "apple" looks someting like this:
q=apple
qf=title^0.4 keywords:"apple"^0.5
bf=hits^0.4 rating^0.3
So as you can see I boost by "keywords" but the problem is that I don't know which item was most clicked for "apple".
I've tried adding boost parameter to every keyword on initial index import. It didn't help 开发者_Python百科and I'm out of ideas.
How are you maintaining the clicked data ?
How about also maintaining the cumulative clicked data as a single field with the document.
You can easily use this field to boost the documents overall using the dismax boost functions.
A large set of mathematical functions can be used @ http://wiki.apache.org/solr/FunctionQuery#What_is_a_Function.3F
精彩评论