lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Commented: (LUCENE-850) Easily create queries that transform subquery scores arbitrarily
Date Tue, 05 Jun 2007 17:24:26 GMT


Doron Cohen commented on LUCENE-850:


If I understood it correctly your patch can be described as:
- turn DisMaxQuery into a private case of a new generalized "CustomizableOrQuery"
- demostrates this customizability with a new ProductQuery.
- DisMax(OR)Query logic is as before = max =f scob-scores plus tie breaker.
- Product(OR)Query logic is: score = multiplication of scores of sub-scorers.

The regular Bolean Or could probably be phrased this way as Sum(OR)Qurey.

Now in LUCENE-446 I added CustomScoreQuery, which is simpler: 
- score = f (score(q), score(vq))
- f() is overridable, 
- q is any query
- vq is optional, and it is a value-source-query, likely based on (cached) field values.

So it currently doesn't support your comment
   "I've often wanted to multiply the scores of two queries".

When first writing CustomScoreQuery I looked at combining any two or N subqueries, but wasn't
sure how to do this. How to normalize. How to calculate the weights. But now I think that
we could  perhaps follow your approach closer: call it CustomOrQuery, go for any N subqueries,
and define f() accordingly. 

But is this really required / useful?  
What are the use cases for this general/arbiterary combining of scores (beyond current capabilities


> Easily create queries that transform subquery scores arbitrarily
> ----------------------------------------------------------------
>                 Key: LUCENE-850
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>            Reporter: Mike Klaas
>            Assignee: Doron Cohen
>         Attachments: prodscorer.patch.diff
> Refactor DisMaxQuery into SubQuery(Query|Scorer) that admits easy subclassing.  An example
is given for multiplicatively combining scores.
> Note: patch is not clean; for demonstration purposes only.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message