use of org.opensearch.plugins.SearchPlugin.QuerySpec in project OpenSearch by opensearch-project.
the class SearchModule method registerQuery.
private void registerQuery(QuerySpec<?> spec) {
namedWriteables.add(new NamedWriteableRegistry.Entry(QueryBuilder.class, spec.getName().getPreferredName(), spec.getReader()));
namedXContents.add(new NamedXContentRegistry.Entry(QueryBuilder.class, spec.getName(), (p, c) -> spec.getParser().fromXContent(p)));
}
Aggregations