lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LUCENE-5155) Add OrdinalValueResolver in favor of FacetRequest.getValueOf
Date Thu, 01 Aug 2013 10:05:53 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-5155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shai Erera resolved LUCENE-5155.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.5
                   5.0

Thanks Gilad, added a comment and committed.
                
> Add OrdinalValueResolver in favor of FacetRequest.getValueOf
> ------------------------------------------------------------
>
>                 Key: LUCENE-5155
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5155
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 5.0, 4.5
>
>         Attachments: LUCENE-5155.patch
>
>
> FacetRequest.getValueOf is responsible for resolving an ordinal's value. It is given
FacetArrays, and typically does something like {{arrays.getIntArray()[ord]}} -- for every
ordinal! The purpose of this method is to allow special requests, e.g. average, to do some
post processing on the values, that couldn't be done during aggregation.
> I feel that getValueOf is in the wrong place -- the calls to getInt/FloatArray are really
redundant. Also, if an aggregator maintains some statistics by which it needs to "correct"
the aggregated values, it's not trivial to pass it from the aggregator to the request.
> Therefore I would like to make the following changes:
> * Remove FacetRequest.getValueOf and .getFacetArraysSource
> * Add FacetsAggregator.createOrdinalValueResolver which takes the FacetArrays and has
a simple API .valueOf(ordinal).
> * Modify the FacetResultHandlers to use OrdValResolver.
> This allows an OVR to initialize the right array instance(s) in the ctor, and return
the value of the requested ordinal, without doing arrays.getArray() calls.
> Will post a patch shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message