lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar (JIRA)" <>
Subject [jira] [Updated] (SOLR-1871) Function Query "map" variant that allows "target" to be an arbitrary ValueSource
Date Sun, 01 Dec 2013 18:03:35 GMT


Shalin Shekhar Mangar updated SOLR-1871:

    Attachment: SOLR-1871.patch

Patch updated to trunk.

I found a bug in TestValueSources.assertHits which was using search(Query, int, sort) method
and didn't actually calculate scores. The whole test therefore wasn't actually testing anything.
I changed it to use the search(Query, Filter, int, Sort, boolean, boolean) method.

The javadoc for RangeMapFloatFunction also was a copy/paste from LinearFloatFunction. This
patch fixes that as well.

> Function Query "map" variant that allows "target" to be an arbitrary ValueSource
> --------------------------------------------------------------------------------
>                 Key: SOLR-1871
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.4
>            Reporter: Chris Harris
>         Attachments: ASF.LICENSE.NOT.GRANTED--SOLR-1871.patch, SOLR-1871.patch, SOLR-1871.patch,
> Currently, as documented at, the "target"
of a map must be a floating point constant. I propose that you should have at least the option
of doing a map where the target is an arbitrary ValueSource.
> The particular use case that inspired this is that I want to be able to control how missing
date fields affected boosting. In particular, I want to be able to use something like this
in my function queries:
> {code}
> map(mydatefield,0,0,ms(NOW))
> {code}
> But this might have other uses.
> I'll attach an initial implementation.

This message was sent by Atlassian JIRA

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

View raw message