[
https://issues.apache.org/jira/browse/LUCENE-4610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559041#comment-13559041
]
Shai Erera commented on LUCENE-4610:
------------------------------------
Based on the results from LUCENE-4600, it doesn't look like NO_PARENTS will be
made the default. And even regardless of the results, it's not a good default
because the user can easily make a mistake and index multiple CPs that share a
parent in one document. NO_PARENTS is an optimization mostly, while ALL_PARENTS
cannot make a mistake (i.e. over count parents). Therefore it should be treated
as such.
Also, I've been thinking about what would it take to support NO_PARENTS by
StandardFacetsCollector and it's not so trivial. Is it an Aggregator, an
Accumulator? How does it work in conjunction with partitions, complements,
sampling? And how does it fit with LUCENE-4700?
There are a lot of open questions. I think that for now the safest thing would
be to document that only CountingFacetsCollector works with it (given its
limited support), and do a hard check in StandardFacetsCollector (or
FacetsCollector.create) and fail fast.
> Implement a NoParentsAccumulator
> --------------------------------
>
> Key: LUCENE-4610
> URL: https://issues.apache.org/jira/browse/LUCENE-4610
> Project: Lucene - Core
> Issue Type: New Feature
> Components: modules/facet
> Reporter: Shai Erera
> Attachments: LUCENE-4610.patch
>
>
> Mike experimented with encoding just the exact categories ordinals on
> LUCENE-4602, and I added OrdinalPolicy.NO_PARENTS, with a comment saying that
> this requires a special FacetsAccumulator.
> The idea is to write the exact categories only for each document, and then at
> search time count up the parents chain to compute requested facets (I say
> count, but it can be any weight).
> One limitation of such accumulator is that it cannot be used when e.g. a
> document is associated with two categories who share the same parent, because
> that may result in incorrect weights computed (e.g. a document might have
> several Authors, and so counting the Author facet may yield wrong counts). So
> it can be used only when the app knows it doesn't add such facets, or that it
> always asks to aggregate a 'root' that in its path this criteria doesn't hold
> (no categories share the same parent).
--
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]