You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2013/07/29 20:59:50 UTC

[jira] [Resolved] (LUCENE-5147) Consider returning a Map from FacetsAccumulator

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

Shai Erera resolved LUCENE-5147.
--------------------------------

    Resolution: Won't Fix

I started to do it, but this has a large impact on tests. I don't see how much value it brings, plus an app can easily put the results in a map and lookup requests:

{code}
Map<FacetRequest,FacetResult> results = new HashMap<>();
for (FacetResult fres : facetResults) {
  results.put(fres.getFacetRequest(), fres);
}
{code}

Resolving as Won't Fix for now, if this will be a problem we can reopen.
                
> Consider returning a Map<FacetRequest,FacetResult> from FacetsAccumulator
> -------------------------------------------------------------------------
>
>                 Key: LUCENE-5147
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5147
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/facet
>            Reporter: Shai Erera
>
> Today the API returns a List which suggests there's an ordering going on. This may be confusing if one uses FacetsAccumulator.create which results in a MultiFacetsAccumulator, and then the order of the results does not correspond to the order of the requests.
> Rather than trying to enforce ordering, a simple mapping may be better even for consuming apps since they will be able to easily lookup desired results.

--
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