lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Commit Tag Bot (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4831) Association facets aggregators should not support rollupValues
Date Thu, 14 Mar 2013 20:54:13 GMT


Commit Tag Bot commented on LUCENE-4831:

[branch_4x commit] Shai Erera

LUCENE-4831: Association facets aggregators should not support rollupValues

> Association facets aggregators should not support rollupValues
> --------------------------------------------------------------
>                 Key: LUCENE-4831
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/facet
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 5.0, 4.3
>         Attachments: LUCENE-4831.patch
> While porting code to 4.2 I noticed that AssociationIntSumFacetsAggregator implements
rollupValues by using the floatArray() rather than the int[]. This is probably a copy-paste
mistake from AssociationFloatSum, but it got me thinking how come tests do not fail? After
reviewing the tests I realized why don't fail -- associations should not work with OrdinalPolicy.NO_PARENTS.
They do not rollupValues, but aggregate the exact ordinals' values that they meet. I.e. if
you added Movie/Genre/Horror with confidence level 0.65, it applies to just that category,
and not the parents. If you want to apply it to the parents, you need to add Movie/Genre with
that confidence level (or different one) as well.
> I am not sure though what's the best approach to handle it. Should rollupValues throw
UOE or have a no-op impl? On one hand, you really shouldn't be calling that method, meaning
you cannot assume that if you index association values with NO_PARENTS, then their parents
will be aggregated.
> On the other hand, someone might want to index the full hierarchy for counting too, using
different aggregators for different requests. In that case, the OrdinalPolicy of that CP might
be NO_PARENTS, and FacetsAccumulator will call rollupValues. So having a no-op method impl
is quieter.
> I think I'll leave a no-op impl?

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:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message