Perhaps back up and see if we can do this a simpler way than a request
handler...
What is the query structure you are trying to generate?


I have two dismax queries defined in a solrconfig. Something like

  <requestHandler name="q1" class="solr.DisMaxRequestHandler" >
        ...
     <str name="qf">
       raw^4 name^1
     </str>
  </requestHandler>

  <requestHandler name="q2" class="solr.DisMaxRequestHandler" >
        ...
     <str name="qf">
       tags^3 type^2
     </str>
  </requestHandler>

They work fine on their own, and we often use &bf=sortable^... to change the ordering. But we want to merge them. Result IDs that show up in both need to go higher and with a url param we need to weight between the two. So I am making a /combined requesthandler that takes the query, the weights between the two and the value of the bf=sortable boost.

My handler: /combined?q=kittens&q1=0.5&q2=0.8&bfboost=2.0

Would query ?qt=q1&q=kittens&bf=2&fl=id, then ? qt=q2&q=kittens&bf=2&fl=id. The request handler would return the results of a term query with the (q1 returned IDs)^0.5 (q2 returned IDs)^0.8.






Reply via email to