private EsRequest fieldMapping ( PropertyType type ) { EsRequest mappings = new EsRequest ( ) ; switch ( type ) { case BINARY : mappings . put ( "type" , "binary" ) ; break ; case BOOLEAN : mappings . put ( "type" , "boolean" ) ; break ; case DATE : mappings . put ( "type" , "long" ) ; break ; case LONG : case DECIMAL : mappings . put ( "type" , "long" ) ; break ; case DOUBLE : mappings . put ( "type" , "double" ) ; break ; default : mappings . put ( "type" , "string" ) ; mappings . put ( "analyzer" , "whitespace" ) ; } return mappings ; }
Creates mapping definition for the specified column type .