Example usage for org.springframework.data.elasticsearch.core.facet FacetRequest FIELD_SORT

List of usage examples for org.springframework.data.elasticsearch.core.facet FacetRequest FIELD_SORT

Introduction

In this page you can find the example usage for org.springframework.data.elasticsearch.core.facet FacetRequest FIELD_SORT.

Prototype

String FIELD_SORT

To view the source code for org.springframework.data.elasticsearch.core.facet FacetRequest FIELD_SORT.

Click Source Link

Usage

From source file:org.springframework.data.elasticsearch.core.MappingBuilder.java

/**
 * Sort field for string type, for other types we don't need it(long, int, double, float)
 * value of the field should be converted to lowercase and not analise
 *
 * @param builder//  ww  w.j av a2 s  .  co  m
 * @param field
 * @param annotation
 * @throws IOException
 */
private static void addSortMapping(XContentBuilder builder, java.lang.reflect.Field field, Field annotation)
        throws IOException {
    builder.startObject(FacetRequest.FIELD_SORT).field(FIELD_TYPE, TYPE_VALUE_STRING)
            .field(FIELD_INDEX, "keyword").field(FIELD_STORE, true);
    builder.endObject();
}