The boost parameter is part of the edismax query parser. If you have your
own query parser you could introduce your own argument "boost" and
interpret it as a value source. Here's the code that parses the external
function query in edismax

https://github.com/apache/lucene-solr/blob/15d634b9ef2ea52e86994d7722da384dfceb8b66/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java#L446

You could easily re-purpose to your needs

-Doug

On Tue, Aug 18, 2015 at 7:59 PM, Paul Libbrecht <p...@hoplahup.net> wrote:

> Doug Turnbull wrote:
> > I'm not sure if you mean organizing function queries under the hood in a
> > query component or externally.
> >
> > Externally, I've always followed John Berryman's great advice for working
> > with Solr when dealing with complex/reusable function queries and boosts
> >
> http://opensourceconnections.com/blog/2013/11/22/parameterizing-and-organizing-solr-boosts/
> Very very cute indeed.
>
> However, I think I need it internally.
> You're making me doubt.
> Do I understand properly that this boost parameter is just operating a
> power overall on the query?
> 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?
>
> thanks
>
> Paul
>
>


-- 
*Doug Turnbull **| *Search Relevance Consultant | OpenSource Connections
<http://opensourceconnections.com>, LLC | 240.476.9983
Author: Relevant Search <http://manning.com/turnbull>
This e-mail and all contents, including attachments, is considered to be
Company Confidential unless explicitly stated otherwise, regardless
of whether attachments are marked as such.

Reply via email to