: My current expansion expands from the : user-query : to the : +user-query favouring-query-depending-other-params overall-favoring-query : (where the overall-favoring-query could be computed as a function). : With the boost parameter, i'd do: : (+user-query favouring-query-depending-other-params)^boost-function : : Not exactly the same or?
w/o more specifics it's hard to be certain, but nothing you've described so far sounds like you really need custom code. just use things like the "boost" QParser in conjunction with other nested parsers. ie: instead of users sending q=user-query have hte user send qq=user-query and write your main query something like... ?q={!boost b=boost-function v=$x} &x=(+{!query v=$qq} {!query v=$favor}) &favor=favouring-query-depending-other-params &qq=user-query See also... https://people.apache.org/~hossman/ac2012eu/ http://vimeopro.com/user11514798/apache-lucene-eurocon-2012/video/55822630 -Hoss http://www.lucidworks.com/