Skip to content

Commit d0e5ba1

Browse files
author
Tom May
committed
Move lru configuration to client.lru.*.
1 parent 0d4e543 commit d0e5ba1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

config/elasticsearch.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# use our LruIndex manager
22
client:
33
type: org.elasticsearch.plugin.lruclient.LruClient
4+
lru:
5+
size: 10
46

57
# make sure we store these somewhere as the LruClient closes them locally
68
gateway:

plugins/client/lru/src/main/java/org/elasticsearch/plugin/lruclient/LruClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ protected boolean removeEldestEntry(Entry<String, Date> eldest) {
9393
TransportMoreLikeThisAction moreLikeThisAction) {
9494
super(settings,threadPool,admin,indexAction,deleteAction,bulkAction,deleteByQueryAction,getAction,countAction,searchAction,searchScrollAction,moreLikeThisAction);
9595
this.logger = Loggers.getLogger(getClass());
96-
this.cache = Collections.synchronizedMap(new LruCache(settings.getAsInt("node.lrucache.size", 1)));
96+
this.logger.debug("Lru cache size = " + settings.getAsInt("client.lru.size", 1));
97+
this.cache = Collections.synchronizedMap(new LruCache(settings.getAsInt("client.lru.size", 1)));
9798
}
9899

99100
private void ensureOpen(final String index) {

0 commit comments

Comments
 (0)