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

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

Introduction

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

Prototype

String FIELD_UNTOUCHED

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

Click Source Link

Usage

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

/**
 * Facet field for string type, for other types we don't need it(long, int, double, float)
 *
 * @param builder//from  ww  w  . j  a  v  a 2  s  . c om
 * @param field
 * @param annotation
 * @throws IOException
 */
private static void addFacetMapping(XContentBuilder builder, java.lang.reflect.Field field, Field annotation)
        throws IOException {
    builder.startObject(FacetRequest.FIELD_UNTOUCHED).field(FIELD_TYPE, TYPE_VALUE_STRING)
            .field(FIELD_INDEX, INDEX_VALUE_NOT_ANALYZED).field(FIELD_STORE, true);
    builder.endObject();
}