Exemplo n.º 1
0
 public static void parseIndex(String fieldName, String index, AbstractFieldMapper.Builder builder)
     throws MapperParsingException {
   index = Strings.toUnderscoreCase(index);
   if ("no".equals(index)) {
     builder.index(false);
   } else if ("not_analyzed".equals(index)) {
     builder.index(true);
     builder.tokenized(false);
   } else if ("analyzed".equals(index)) {
     builder.index(true);
     builder.tokenized(true);
   } else {
     throw new MapperParsingException(
         "Wrong value for index [" + index + "] for field [" + fieldName + "]");
   }
 }