Search in sources :

Example 6 with ESFilesystemIndexQueryAssembler

use of org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler in project qi4j-sdk by Qi4j.

the class ElasticSearchComplexQueryTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    // Config module
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // Index/Query
    new ESFilesystemIndexQueryAssembler().withConfig(config, Visibility.layer).assemble(module);
    ElasticSearchConfiguration esConfig = config.forMixin(ElasticSearchConfiguration.class).declareDefaults();
    esConfig.indexNonAggregatedAssociations().set(Boolean.TRUE);
    // FileConfig
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File(DATA_DIR, "qi4j-data")).withLog(new File(DATA_DIR, "qi4j-logs")).withTemporary(new File(DATA_DIR, "qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Aggregations

ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)6 ESFilesystemIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler)6 File (java.io.File)5 FileConfigurationOverride (org.qi4j.library.fileconfig.FileConfigurationOverride)5 FileConfigurationService (org.qi4j.library.fileconfig.FileConfigurationService)5 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)5 Visibility (org.qi4j.api.common.Visibility)1 ESClusterIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESClusterIndexQueryAssembler)1 ESMemoryIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESMemoryIndexQueryAssembler)1