[jira] [Updated] (LUCENE-4893) Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as FacetsCollector.getFacetResults is called.

2013-03-31 Thread Shai Erera (JIRA)

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

Shai Erera updated LUCENE-4893:
---

Attachment: LUCENE-4893.patch

Patch makes FacetsCollector cache the facet results, so .get is now a getter. 
reset() clears the cached results. Added additional test for reset().

> 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, 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-4893) Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as FacetsCollector.getFacetResults is called.

2013-03-31 Thread Shai Erera (JIRA)

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

Shai Erera updated LUCENE-4893:
---

Attachment: LUCENE-4893.patch

I still didn't fix jdocs, this patch throws IllegalStateException if 
getFacetResults is called more than once, or no search was executed. But this 
gets TestDrillSideways.testBasic to fail, because DrillSideways (line 168) 
assumes it can call getFacetResult() even if the scorer it got was null.

I wonder what's the best course of action - track in FacetsCollector only the 
case where getFacetResult was called more than once, or simply caching the 
List and return it in .get() if it isn't null. An exception now 
seems too obtrusive to me ...

> 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, 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-4893) Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as FacetsCollector.getFacetResults is called.

2013-03-31 Thread Shai Erera (JIRA)

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

Shai Erera updated LUCENE-4893:
---

Attachment: LUCENE-4893.patch

Thanks crocket. I found a typo in the test's comment, so if you meant another 
one, please specify which file has the typo. I also improved 
FacetsCollector.getFacetResults documentation.

> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org




[jira] [Updated] (LUCENE-4893) Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as FacetsCollector.getFacetResults is called.

2013-03-30 Thread Shai Erera (JIRA)

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

Shai Erera updated LUCENE-4893:
---

Attachment: LUCENE-4893.patch

Patch addresses the following:

* FacetsCollector.getFacetResults() clears the matchingDocs list after 
accumulator.compute returned.

* FacetsAccumulator creates an empty FacetResult for each FacetRequest if 
matchingDocs.isEmpty(). I had to do it because FacetArrays still contained the 
original counts, and so calling .getFacetResults twice yielded the same results 
as before. But this is inconsistent with how StandardFacetsAccumulator works, 
so I preferre\ed to return an empty FacetResult in both cases.

* Added a test case to TestFacetsCollector.

I think it's ready.

> 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
>
>
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-4893) Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as FacetsCollector.getFacetResults is called.

2013-03-30 Thread crocket (JIRA)

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

crocket updated LUCENE-4893:


Description: 
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?

  was:
In lucene 4.1, only StandardFacetsAccumulator could be instantiated.
And as of lucene 4.2, it became possible to instantiate FacetsAccumulator.

I invoked FacetCollector.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?


> 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
>
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-4893) Facet counts in FacetsAccumulator.facetArrays are multiplied as many times as FacetsCollector.getFacetResults is called.

2013-03-30 Thread crocket (JIRA)

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

crocket updated LUCENE-4893:


Summary: Facet counts in FacetsAccumulator.facetArrays are multiplied as 
many times as FacetsCollector.getFacetResults is called.  (was: Facet counts in 
FacetsAccumulator.facetArrays are multiplied as many times as 
FacetCollector.getFacetResults is called.)

> 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
>
> In lucene 4.1, only StandardFacetsAccumulator could be instantiated.
> And as of lucene 4.2, it became possible to instantiate FacetsAccumulator.
> I invoked FacetCollector.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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org