lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Harris (JIRA)" <>
Subject [jira] Updated: (SOLR-1871) Function Query "map" variant that allows "target" to be an arbitrary ValueSource
Date Thu, 08 Apr 2010 20:03:36 GMT


Chris Harris updated SOLR-1871:

    Attachment: SOLR-1871.patch

A first stab at this. In this implementation, we use copy and paste and create a wholly separate
function, "mapf" ("f" because this map is more function-oriented).

mapf is not as efficient as normal map when the target is a constant. If the target is a constant,
you now have something like a LongConstValueSource where you used to have just a float. I
haven't tried to measure the performance difference.

RangeMapfFloatFunction.hashCode() may be messed up. It's based on RangeMapFloatFunction.hashCode(),
but I threw this patch together without stopping to properly understand that. method first.

> 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: 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 is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message