use of org.opensearch.search.SearchModule in project OpenSearch by opensearch-project.
the class ShardValidateQueryRequestTests method setUp.
public void setUp() throws Exception {
super.setUp();
IndicesModule indicesModule = new IndicesModule(Collections.emptyList());
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
List<NamedWriteableRegistry.Entry> entries = new ArrayList<>();
entries.addAll(indicesModule.getNamedWriteables());
entries.addAll(searchModule.getNamedWriteables());
namedWriteableRegistry = new NamedWriteableRegistry(entries);
}
use of org.opensearch.search.SearchModule in project OpenSearch by opensearch-project.
the class AggregatorFactoriesTests method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
Settings settings = Settings.builder().put("node.name", AbstractQueryTestCase.class.toString()).put(Environment.PATH_HOME_SETTING.getKey(), createTempDir()).build();
xContentRegistry = new NamedXContentRegistry(new SearchModule(settings, emptyList()).getNamedXContents());
}
use of org.opensearch.search.SearchModule in project OpenSearch by opensearch-project.
the class AggregatorFactoriesBuilderTests method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
// register aggregations as NamedWriteable
SearchModule searchModule = new SearchModule(Settings.EMPTY, emptyList());
namedWriteableRegistry = new NamedWriteableRegistry(searchModule.getNamedWriteables());
namedXContentRegistry = new NamedXContentRegistry(searchModule.getNamedXContents());
}
use of org.opensearch.search.SearchModule in project OpenSearch by opensearch-project.
the class CollapseBuilderTests method init.
@BeforeClass
public static void init() {
SearchModule searchModule = new SearchModule(Settings.EMPTY, emptyList());
namedWriteableRegistry = new NamedWriteableRegistry(searchModule.getNamedWriteables());
xContentRegistry = new NamedXContentRegistry(searchModule.getNamedXContents());
}
use of org.opensearch.search.SearchModule in project OpenSearch by opensearch-project.
the class HighlightBuilderTests method init.
/**
* setup for the whole base test class
*/
@BeforeClass
public static void init() {
SearchModule searchModule = new SearchModule(Settings.EMPTY, emptyList());
namedWriteableRegistry = new NamedWriteableRegistry(searchModule.getNamedWriteables());
xContentRegistry = new NamedXContentRegistry(searchModule.getNamedXContents());
}
Aggregations