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