Search in sources :

Example 1 with ScriptSortBuilder

use of org.elasticsearch.search.sort.ScriptSortBuilder in project elasticsearch by elastic.

the class SearchModule method registerSorts.

private void registerSorts() {
    namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, GeoDistanceSortBuilder.NAME, GeoDistanceSortBuilder::new));
    namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, ScoreSortBuilder.NAME, ScoreSortBuilder::new));
    namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, ScriptSortBuilder.NAME, ScriptSortBuilder::new));
    namedWriteables.add(new NamedWriteableRegistry.Entry(SortBuilder.class, FieldSortBuilder.NAME, FieldSortBuilder::new));
}
Also used : NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) GeoDistanceSortBuilder(org.elasticsearch.search.sort.GeoDistanceSortBuilder) FieldSortBuilder(org.elasticsearch.search.sort.FieldSortBuilder) SortBuilder(org.elasticsearch.search.sort.SortBuilder) ScriptSortBuilder(org.elasticsearch.search.sort.ScriptSortBuilder) ScoreSortBuilder(org.elasticsearch.search.sort.ScoreSortBuilder) Entry(org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry)

Aggregations

NamedWriteableRegistry (org.elasticsearch.common.io.stream.NamedWriteableRegistry)1 Entry (org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry)1 FieldSortBuilder (org.elasticsearch.search.sort.FieldSortBuilder)1 GeoDistanceSortBuilder (org.elasticsearch.search.sort.GeoDistanceSortBuilder)1 ScoreSortBuilder (org.elasticsearch.search.sort.ScoreSortBuilder)1 ScriptSortBuilder (org.elasticsearch.search.sort.ScriptSortBuilder)1 SortBuilder (org.elasticsearch.search.sort.SortBuilder)1