[
https://issues.apache.org/jira/browse/LUCENE-8042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241882#comment-16241882
]
Robert Muir commented on LUCENE-8042:
-------------------------------------
Can we reconsider the latter?
This is a bit too much indirection and abstractions IMO for something that's
essentially a boolean method returning {{fi.dvGen == -1}}:
{code}
@Override
public IndexReader.CacheHelper getCacheHelper(LeafReaderContext context)
{
return SegmentCachable.getDocValuesCacheHelper(field, context);
}
{code}
Given that this is an abstract method (required) on Weight, and given that we
can *only cache per-segment*, can we please simplify it?
> Add SegmentCachable interface
> -----------------------------
>
> Key: LUCENE-8042
> URL: https://issues.apache.org/jira/browse/LUCENE-8042
> Project: Lucene - Core
> Issue Type: New Feature
> Reporter: Alan Woodward
> Attachments: LUCENE-8042.patch
>
>
> Following LUCENE-8017, I tried to add a getCacheHelper(LeafReaderContext)
> method to DoubleValuesSource so that Weights that use DVS can delegate on.
> This ended up with the same method being added to LongValuesSource, and some
> of the similar objects in spatial-extras. I think it makes sense to abstract
> this out into a separate SegmentCachable interface.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]