Package org.elasticsearch.common.settings

Examples of org.elasticsearch.common.settings.SettingsModule


    }

    private AnalysisService testSimpleConfiguration(Settings settings) {
        Index index = new Index("test");

        Injector parentInjector = new ModulesBuilder().add(new SettingsModule(settings),
                new EnvironmentModule(new Environment(settings)),
                new IndicesAnalysisModule()).createInjector();
        Injector injector = new ModulesBuilder().add(
                new IndexSettingsModule(index, settings),
                new IndexNameModule(index),
View Full Code Here


        Settings settings = ImmutableSettings.settingsBuilder()
                .put("index.cache.filter.type", "none")
                .build();
        Index index = new Index("test");
        Injector injector = new ModulesBuilder().add(
                new SettingsModule(settings),
                new ThreadPoolModule(settings),
                new ScriptModule(settings),
                new IndicesQueriesModule(),
                new MapperServiceModule(),
                new IndexSettingsModule(index, settings),
View Full Code Here

                new IndexNameModule(new Index("test")),
                new IndexQueryParserModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
                new AnalysisModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
                new SimilarityModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
                new ScriptModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
                new SettingsModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
                new IndexEngineModule(ImmutableSettings.Builder.EMPTY_SETTINGS),
                new IndexCacheModule(ImmutableSettings.Builder.EMPTY_SETTINGS)
        ).createInjector();
        return injector.getInstance(IndexQueryParserService.class);
    }
View Full Code Here

                .build();
        this.environment = tuple.v2();

        ModulesBuilder modules = new ModulesBuilder();
        modules.add(new EnvironmentModule(environment));
        modules.add(new SettingsModule(settings));
        modules.add(new NetworkModule());
        modules.add(new ClusterNameModule(settings));
        modules.add(new ThreadPoolModule(settings));
        modules.add(new TransportSearchModule());
        modules.add(new TransportModule(settings));
View Full Code Here

    @Test public void testNativeScript() {
        Settings settings = ImmutableSettings.settingsBuilder()
                .put("script.native.my.type", MyNativeScriptFactory.class.getName())
                .build();
        Injector injector = new ModulesBuilder().add(
                new SettingsModule(settings),
                new ScriptModule(settings)).createInjector();

        ScriptService scriptService = injector.getInstance(ScriptService.class);

        ExecutableScript executable = scriptService.executable("native", "my", null);
View Full Code Here

        Settings settings = ImmutableSettings.settingsBuilder()
                .put("index.cache.filter.type", "none")
                .build();
        Index index = new Index("test");
        Injector injector = new ModulesBuilder().add(
                new SettingsModule(settings),
                new ThreadPoolModule(settings),
                new IndicesQueriesModule(),
                new ScriptModule(settings),
                new MapperServiceModule(),
                new IndexSettingsModule(index, settings),
View Full Code Here

        Settings settings = ImmutableSettings.settingsBuilder()
                .put("index.cache.filter.type", "none")
                .build();
        Index index = new Index("test");
        Injector injector = new ModulesBuilder().add(
                new SettingsModule(settings),
                new ThreadPoolModule(settings),
                new IndicesQueriesModule(),
                new ScriptModule(settings),
                new MapperServiceModule(),
                new IndexSettingsModule(index, settings),
View Full Code Here

        this.settings = pluginsService.updatedSettings();
        this.environment = tuple.v2();

        ModulesBuilder modules = new ModulesBuilder();
        modules.add(new PluginsModule(settings, pluginsService));
        modules.add(new SettingsModule(settings));
        modules.add(new NodeModule(this));
        modules.add(new NetworkModule());
        modules.add(new NodeCacheModule(settings));
        modules.add(new ScriptModule(settings));
        modules.add(new JmxModule(settings));
View Full Code Here

public class SimpleIcuAnalysisTests {

    @Test public void testDefaultsIcuAnalysis() {
        Index index = new Index("test");

        Injector parentInjector = new ModulesBuilder().add(new SettingsModule(EMPTY_SETTINGS), new EnvironmentModule(new Environment(EMPTY_SETTINGS)), new IndicesAnalysisModule()).createInjector();
        Injector injector = new ModulesBuilder().add(
                new IndexSettingsModule(index, EMPTY_SETTINGS),
                new IndexNameModule(index),
                new AnalysisModule(EMPTY_SETTINGS, parentInjector.getInstance(IndicesAnalysisService.class)).addProcessor(new IcuAnalysisBinderProcessor()))
                .createChildInjector(parentInjector);
View Full Code Here

        queryParserModule.addQueryParser("my", PluginJsonQueryParser.class);
        queryParserModule.addFilterParser("my", PluginJsonFilterParser.class);

        Index index = new Index("test");
        Injector injector = new ModulesBuilder().add(
                new SettingsModule(settings),
                new ThreadPoolModule(settings),
                new IndicesQueriesModule(),
                new ScriptModule(settings),
                new IndexSettingsModule(index, settings),
                new IndexCacheModule(settings),
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.settings.SettingsModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.