lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Stahl <j...@yelp.com>
Subject Re: exponential boosts
Date Fri, 10 Apr 2009 20:08:29 GMT
Perhaps you'd find it easier to implement the equivalent:

log(s1(d, q))*a1 + ... + log(sN(d, q))*aN

On Fri, Apr 10, 2009 at 12:56 PM, Steven Bethard <bethard@stanford.edu>wrote:

> I need to have a scoring model of the form:
>
>    s1(d, q)^a1 * s2(d, q)^a2 * ... * sN(d, q)^aN
>
> where "d" is a document, "q" is a query, "sK" is a scoring function, and
> "aK" is the exponential boost factor for that scoring function. As a
> simple example, I might have:
>
>    s1 = TF-IDF score matching "text" field (e.g. a TermQuery)
>    a1 = 1.0
>
>    s2 = TF-IDF score matching "author" field (e.g. a TermQuery)
>    a2 = 0.1
>
>    s3 = PageRank score (e.g. a FieldScoreQuery)
>    a3 = 0.5
>
> It's important that the "aK" parameters are exponents in the scoring
> function and not just multipliers because it allows me to do a
> particular kind of optimized search for the best parameter values.
>
> How can I achieve this? My first thought was just that I should set the
> boost factor for each query, but the boost factor is just a multiplier,
> right?
>
> My second thought was to subclass CustomScoreQuery and override
> customScore, but as far as I can tell, CustomScoreQuery can only combine
> a Query with a ValueSourceQuery, while I need to combine a Query with
> another Query (e.g. the example above with two TermQuery scores).
>
> How should I go about this?
>
> Thanks in advance,
>
> Steve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message