lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Klaas (JIRA)" <>
Subject [jira] Commented: (LUCENE-850) Easily create queries that transform subquery scores arbitrarily
Date Tue, 03 Jul 2007 21:07:04 GMT


Mike Klaas commented on LUCENE-850:

Hi Doron,

The main use case is the same as for documents (and to a lesser extent, field-) boosts: the
ability to weight a document by a certain amount (rather than adding an additive boost, as
adding an additional subclause to the query would entail).

The function query capability works for many situations, as you can store the various types
of boosts in a FieldCache and use your approach.  But this doesn't scale when there are tons
of possible boost fields (which would usually be sparsely-populated).  SparseFieldCache, anyone?

I decided to move away from ProductQueries for the time being, so that is no longer the main
use case of this patch.  Primarily the patch stems from developer frustration of implementing
something like ProductQuery.  ISTM that the subquery-handling logic (present in BooleanQuery
and slightly different in DisMaxQuery) needn't be so tightly coupled with a choice of scoring

For the record, DisMax is actually a ( x*Max + (1-x)*Sum ) Query, so it is both Sum and Max.
 Perhaps if we add Prod to the options, there are no more useful subquery combinators?

> Easily create queries that transform subquery scores arbitrarily
> ----------------------------------------------------------------
>                 Key: LUCENE-850
>                 URL:
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>            Reporter: Mike Klaas
>         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