use of org.opensearch.plugins.SearchPlugin.SignificanceHeuristicSpec in project OpenSearch by opensearch-project.
the class SearchModule method registerSignificanceHeuristic.
private <T extends SignificanceHeuristic> void registerSignificanceHeuristic(SignificanceHeuristicSpec<?> spec) {
namedXContents.add(new NamedXContentRegistry.Entry(SignificanceHeuristic.class, spec.getName(), p -> spec.getParser().apply(p, null)));
namedWriteables.add(new NamedWriteableRegistry.Entry(SignificanceHeuristic.class, spec.getName().getPreferredName(), spec.getReader()));
}
Aggregations