[
https://issues.apache.org/jira/browse/LUCENE-4625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13530384#comment-13530384
]
Shai Erera commented on LUCENE-4625:
------------------------------------
You mean with the WeakHashMap? I guess we can do that. But wouldn't it be
better of an AtomicReader would just init the cachable objects when it's
initialized (or lazily when they're asked) and destroy them on close()?
Anyway, that discussion doesn't belong in that issue. I was suggesting the
reader idea because I think that we might need to have a FacetsReader anyway,
in order to e.g. provide on the fly migration of indexes that store the
ordinals in the payload to DV, depends on how Facets-DV comes out.
On the positive side, the WeakHashMap is local to TFC, so it may be easy to
start with. I don't plan to work on that issue for now, just opened it so that
I don't forget :).
> Make TotalFacetCounts per-segment
> ---------------------------------
>
> Key: LUCENE-4625
> URL: https://issues.apache.org/jira/browse/LUCENE-4625
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/facet
> Reporter: Shai Erera
>
> TotalFacetCounts are used during complements computation today. They are not
> per-segment and therefore are not NRT friendly. Even regardless to NRT, you
> need to compute them entirely from scratch whenever you reopen IR.
> It would be good if we can develop them per-segment. If e.g. AtomicReader had
> a notion of cachable objects, it could be such an object. That has been
> discussed many times in the past though, without a consensus. So perhaps we
> can have a FacetsAtomicReader which manages TFC. But that creates other
> issues too, like who instantiates that AtomicReader (i.e. we'd need a
> FacetsCompositeReader too, and potentially IW would need to init that type)
> ...
> Let's explore these options, but in general it would be good to have TFC
> per-segment.
--
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]