[ 
https://issues.apache.org/jira/browse/LUCENE-5427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13887830#comment-13887830
 ] 

Per Steffensen edited comment on LUCENE-5427 at 1/31/14 3:38 PM:
-----------------------------------------------------------------

Fairly primitive for branch_4x patch attached. Didn't want to make the patch 
too big, so e.g. I didn't change from using a static FieldCache.DEFAULT to 
something non-static and method'ish even though that would be obvious to do 
some day. The solution requires that you change the implementation of the 
FieldCache before you ever start using it. I am very unsure what would happen 
if you changed the FieldCache after someone started using it, so I didn't want 
to include that. Changed FieldCacheImpl so that it is easier to extend it, 
which you would probably want to do in most cases where you create you own 
FieldCache-implementation. The changes made to FieldCacheImp are the ones 
necessary for us to make our 
do-not-put-anything-in-the-caches-FieldCache-implementation - so that kinda 
drove what changes I made to FieldCacheImpl.



was (Author: steff1193):
Fairly primitive patch attached. Didn't want to make the patch too big, so e.g. 
I didn't change from using a static FieldCache.DEFAULT to something non-static 
and method'ish even though that would be obvious to do some day. The solution 
requires that you change the implementation of the FieldCache before you ever 
start using it. I am very unsure what would happen if you changed the 
FieldCache after someone started using it, so I didn't want to include that. 
Changed FieldCacheImpl so that it is easier to extend it, which you would 
probably want to do in most cases where you create you own 
FieldCache-implementation. The changes made to FieldCacheImp are the ones 
necessary for us to make our 
do-not-put-anything-in-the-caches-FieldCache-implementation - so that kinda 
drove what changes I made to FieldCacheImpl.


> Support for changing FieldCache implementation in Lucene
> --------------------------------------------------------
>
>                 Key: LUCENE-5427
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5427
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/search
>    Affects Versions: 4.6
>            Reporter: Per Steffensen
>              Labels: facet, fieldcache, range, search, sort
>         Attachments: Override_FieldCache_impl_to_use.patch
>
>
> Believe in general it would be a nice feature to be able to overwrite the 
> FieldCache-implementation in Lucene.
> For instance we override with a FieldCache-implementation that basically does 
> not allow anything to be put in the FieldCache caches. We have so much data 
> that it always creates memory issues.
> But I could imagine other reasons for wanting to override the 
> FieldCache-implementation



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to