On 4/10/2009 1:08 PM, Jack Stahl wrote:
> Perhaps you'd find it easier to implement the equivalent:
> 
> log(s1(d, q))*a1 + ... + log(sN(d, q))*aN

Yes, that's fine too - that's actually what I'd be optimizing anyway.

But how would I do that? If I took the query boost route, how do I get a
TermQuery to produce a score in log-space, while keeping the boost in
regular space? Or if I took the CustomScoreQuery route, how do I combine
two Query scores (not a Query score and a ValueSourceQuery score)?

Steve

> 
> On Fri, Apr 10, 2009 at 12:56 PM, Steven Bethard <beth...@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-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-user-h...@lucene.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to