You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Doron Cohen (JIRA)" <ji...@apache.org> on 2007/06/05 19:24:26 UTC
[jira] Commented: (LUCENE-850) Easily create queries that transform
subquery scores arbitrarily
[ https://issues.apache.org/jira/browse/LUCENE-850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501620 ]
Doron Cohen commented on LUCENE-850:
------------------------------------
Mike,
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))
where
- 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 of o.a.l.search.function)?
Thanks,
Doron
> Easily create queries that transform subquery scores arbitrarily
> ----------------------------------------------------------------
>
> Key: LUCENE-850
> URL: https://issues.apache.org/jira/browse/LUCENE-850
> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org