Use IndexModule.getSettings() to get the settings.

Original commit: elastic/x-pack-elasticsearch@770f859b6c
This commit is contained in:
Adrien Grand 2015-12-02 14:56:34 +01:00
parent afb5cc0d08
commit b43f81a15c

View File

@ -192,12 +192,7 @@ public class ShieldPlugin extends Plugin {
}
if (clientMode == false) {
module.registerQueryCache(ShieldPlugin.OPT_OUT_QUERY_CACHE, OptOutQueryCache::new);
module.addIndexEventListener(new IndexEventListener() {
@Override
public void afterIndexCreated(IndexService indexService) {
failIfShieldQueryCacheIsNotActive(indexService.getIndexSettings().getSettings(), false);
}
});
failIfShieldQueryCacheIsNotActive(module.getSettings(), false);
}
}