On 9/5/07, Mike Klaas <[EMAIL PROTECTED]> wrote:
> > Issues:
> > - Solr still uses it's own FunctionQuery instead of what was added
> > back to Lucene.  May want to migrate first, or may want to hold off if
> > changes are needed that would be easier to make here.
>
> I believe that the main thing missing is the various functions (which
> should be subclasses of CustomScoreQuery).

I could see that for the top-level boost (except for the missing-value problem).
Were you suggesting that other functions also derive from
CustomScoreQuery for some reason?

> > - weighting... if a FunctionQuery is at the top level, we need a way
> > to get back un-weighted scores (actually, looking at the code again,
> > it looks like as long as the boost is 1, we will get back exact scores
> > from the FunctionQuery already).
>
> Why do we need the unweighted score?

More of a customer requirement... the calculated boost also needs to
be obtained separately, so just running the function query alone and
getting the result should work.

> > - Interface: seems like SOLR-334 (pluggable query parsers) could help
> > out here to enable existing handlers to specify a boosted query
> > without introducing yet more different (hard-coded) HTTP query params.
> >
> > Thoughts?
>
> I've implemented exactly this.  see http://issues.apache.org/jira/
> browse/LUCENE-850

Cool, I'll take a look.

-Yonik

> Changed CustomScoreQuery (ValueSource-only) to CustomBoostQuery
> (match/score query + arbitrary multiplicative boost query), and use
> it with dismax (as an arbitrary number of bq.prod parameters) as
> follows:
>
>      // generic product boost queries
>        List<Query> prodBoostQueries = U.parseQueryStrings(req,
> params.getParams(DMP.BQ_PROD));
>        if (null != prodBoostQueries && prodBoostQueries.size() > 0) {
>          Query main = query;
>          Query out = null;
>          for(Query q: prodBoostQueries) {
>            out = new CustomBoostQuery(main, q);
>            main = out;
>          }
>          query = new BooleanQuery(true);
>          query.add(out, Occur.MUST);
>        }
>
> -Mike
>

Reply via email to