public EsRequest mappings ( String type ) { EsRequest mappings = new EsRequest ( ) ; EsRequest mappingsValue = new EsRequest ( ) ; EsRequest mtype = new EsRequest ( ) ; EsRequest properties = new EsRequest ( ) ; for ( EsIndexColumn col : columns ( ) ) { properties . put ( col . getName ( ) , fieldMapping ( col . getType ( ) ) ) ; properties . put ( col . getLowerCaseFieldName ( ) , fieldMapping ( PropertyType . STRING ) ) ; properties . put ( col . getUpperCaseFieldName ( ) , fieldMapping ( PropertyType . STRING ) ) ; properties . put ( col . getLengthFieldName ( ) , fieldMapping ( PropertyType . LONG ) ) ; } mtype . put ( "properties" , properties ) ; mappingsValue . put ( type , mtype ) ; mappings . put ( "mappings" , mappingsValue ) ; return mappings ; }
Provides Elasticsearch mapping definition for the given type and this columns .