[
https://issues.apache.org/jira/browse/LUCENE-8190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385255#comment-16385255
]
David Smiley commented on LUCENE-8190:
--------------------------------------
Perhaps instead of RPT throwing IllegalStateException, we do this pruning on a
best effort basis. The exception is quirky/unfriendly. At the point this is
thrown, we don't have a cell yet to check if it's an instanceof CellCanPrune.
Hmm. Maybe RPT's constructor could grab the world cell to check for
initializing pruneLeafyBranches appropriately. What do you think?
recursiveTraverseAndPrune could also check to see if the cell is _not_ an
instanceof CellCanPrune and simply return false.
Your patch has javadocs that references classes/methods plainly instead of
using {{\{@link ...\}}} syntax. Please correct them. If/when they get
renamed, IDEs will detect these. IDEs also see them in find-usages. At least
this is true with IntellIJ.
The docs refer to "They will be eligible for prune bunchy leaves" but "bunchy"
isn't the setting, it's "leafy". Still, it'd be nicer to @-link the particular
setting as mentioned above. This approach would have avoided the misnomer as
well (another reason to use {{\{@link ...\}}} in javadocs).
> Replace dendency on LegacyCell for setting pruneLeafyBranches on
> RecursivePrefixTreeStrategy
> --------------------------------------------------------------------------------------------
>
> Key: LUCENE-8190
> URL: https://issues.apache.org/jira/browse/LUCENE-8190
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/spatial-extras
> Reporter: Ignacio Vera
> Priority: Major
> Attachments: LUCENE-8190.patch
>
>
> The setting {{pruneLeafyBranches}} on {{RecursivePrefixTreeStrategy}} depends
> on abstract class {{LegacyCell}} and therefore trees like the newly added
> {{S2PrefixTree}} cannot benefit for such optimization.
> It is proposed to add a new specialize interface for {{cell}} interface and
> make the setting depends on it instead of {{LegacyCell.}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]