[
https://issues.apache.org/jira/browse/LUCENE-4893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13618319#comment-13618319
]
Michael McCandless commented on LUCENE-4893:
--------------------------------------------
bq. I chose not to throw an exception because TopDocsCollector returns an empty
TopDocs if called twice.
Actually I think this is bad for TopDocsCollector to do: it's trappy. I think
users don't hit this because typically it's IndexSearcher.search that calls
this method and returns the TopDocs.
I'd rather fix both of these classes to throw an exception if you call their
"getter" methods more than once, than silently pretending the 2nd time there
were no results?
> Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as
> FacetsCollector.getFacetResults is called.
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-4893
> URL: https://issues.apache.org/jira/browse/LUCENE-4893
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/facet
> Affects Versions: 4.2
> Reporter: crocket
> Attachments: LUCENE-4893.patch, LUCENE-4893.patch
>
>
> In lucene 4.1, only StandardFacetsAccumulator could be instantiated.
> And as of lucene 4.2, it became possible to instantiate FacetsAccumulator.
> I invoked FacetsCollector.getFacetResults twice, and I saw doubled facet
> counts.
> If I invoke it three times, I see facet counts multiplied three times.
> It all happens in FacetsAccumulator.accumulate.
> StandardFacetsAccumulator doesn't have this bug since it frees facetArrays
> whenever StandardFacetsAccumulator.accumulate is called.
> Is it a feature or a bug?
--
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: [email protected]
For additional commands, e-mail: [email protected]