public static void checkNoRemainingFields(String fieldName, Map<?, ?> fieldNodeMap, Version indexVersionCreated) { checkNoRemainingFields(fieldNodeMap, indexVersionCreated, "Mapping definition for [" + fieldName + "] has unsupported parameters: "); }
DocumentMapperParser.checkNoRemainingFields(fieldName, propNode, parserContext.indexVersionCreated()); iterator.remove(); } else if (isEmptyList) { DocumentMapperParser.checkNoRemainingFields(propsNode, parserContext.indexVersionCreated(), "DocType mapping definition has unsupported parameters: ");
DocumentMapperParser.checkNoRemainingFields(propName, properties, parserContext.indexVersionCreated()); DEPRECATION_LOGGER.deprecated("The [norms{enabled:true/false}] way of specifying norms is deprecated, please use " + "[norms:true/false] instead");
DocumentMapperParser.checkNoRemainingFields(propName, multiFieldNodes, parserContext.indexVersionCreated());
docBuilder.put(typeParser.parse(fieldName, fieldNodeMap, parserContext)); fieldNodeMap.remove("type"); checkNoRemainingFields(fieldName, fieldNodeMap, parserContext.indexVersionCreated()); checkNoRemainingFields(mapping, parserContext.indexVersionCreated(), "Root mapping definition has unsupported parameters: ");
int minSegmentSize = XContentMapValues.nodeIntegerValue(frequencyFilter.remove("min_segment_size"), 0); builder.fielddataFrequencyFilter(minFrequency, maxFrequency, minSegmentSize); DocumentMapperParser.checkNoRemainingFields(propName, frequencyFilter, parserContext.indexVersionCreated()); iterator.remove(); } else if (propName.equals("index_prefixes")) { Defaults.INDEX_PREFIX_MAX_CHARS); builder.indexPrefixes(minChars, maxChars); DocumentMapperParser.checkNoRemainingFields(propName, indexPrefix, parserContext.indexVersionCreated()); iterator.remove(); } else if (propName.equals("index_phrases")) {
private static ContextMapping load(Map<String, Object> contextConfig, Version indexVersionCreated) { String name = extractRequiredValue(contextConfig, FIELD_NAME); String type = extractRequiredValue(contextConfig, FIELD_TYPE); final ContextMapping contextMapping; switch (Type.fromString(type)) { case CATEGORY: contextMapping = CategoryContextMapping.load(name, contextConfig); break; case GEO: contextMapping = GeoContextMapping.load(name, contextConfig); break; default: throw new ElasticsearchParseException("unknown context type[" + type + "]"); } DocumentMapperParser.checkNoRemainingFields(name, contextConfig, indexVersionCreated); return contextMapping; }
public static void checkNoRemainingFields(String fieldName, Map<?, ?> fieldNodeMap, Version indexVersionCreated) { checkNoRemainingFields(fieldNodeMap, indexVersionCreated, "Mapping definition for [" + fieldName + "] has unsupported parameters: "); }
public static void checkNoRemainingFields(String fieldName, Map<?, ?> fieldNodeMap, Version indexVersionCreated) { checkNoRemainingFields(fieldNodeMap, indexVersionCreated, "Mapping definition for [" + fieldName + "] has unsupported parameters: "); }
public static void checkNoRemainingFields(String fieldName, Map<?, ?> fieldNodeMap, Version indexVersionCreated) { checkNoRemainingFields(fieldNodeMap, indexVersionCreated, "Mapping definition for [" + fieldName + "] has unsupported parameters: "); }
public static void checkNoRemainingFields(String fieldName, Map<String, Object> fieldNodeMap, Version indexVersionCreated) { checkNoRemainingFields(fieldNodeMap, indexVersionCreated, "Mapping definition for [" + fieldName + "] has unsupported parameters: "); }
private void parseTransform(DocumentMapper.Builder docBuilder, Map<String, Object> transformConfig, Version indexVersionCreated) { Script script = Script.parse(transformConfig, true, parseFieldMatcher); if (script != null) { docBuilder.transform(scriptService, script); } checkNoRemainingFields(transformConfig, indexVersionCreated, "Transform config has unsupported parameters: "); }
protected static ContextMapping loadMapping(String name, Map<String, Object> config, Version indexVersionCreated) throws ElasticsearchParseException { final Object argType = config.get(ContextMapping.FIELD_TYPE); if (argType == null) { throw new ElasticsearchParseException("missing [{}] in context mapping", ContextMapping.FIELD_TYPE); } final String type = argType.toString(); ContextMapping contextMapping; if (GeolocationContextMapping.TYPE.equals(type)) { contextMapping = GeolocationContextMapping.load(name, config); } else if (CategoryContextMapping.TYPE.equals(type)) { contextMapping = CategoryContextMapping.load(name, config); } else { throw new ElasticsearchParseException("unknown context type [{}]", type); } config.remove(ContextMapping.FIELD_TYPE); DocumentMapperParser.checkNoRemainingFields(name, config, indexVersionCreated); return contextMapping; } }
protected static ContextMapping loadMapping(String name, Map<String, Object> config, Version indexVersionCreated) throws ElasticsearchParseException { final Object argType = config.get(ContextMapping.FIELD_TYPE); if (argType == null) { throw new ElasticsearchParseException("missing [{}] in context mapping", ContextMapping.FIELD_TYPE); } final String type = argType.toString(); ContextMapping contextMapping; if (GeolocationContextMapping.TYPE.equals(type)) { contextMapping = GeolocationContextMapping.load(name, config); } else if (CategoryContextMapping.TYPE.equals(type)) { contextMapping = CategoryContextMapping.load(name, config); } else { throw new ElasticsearchParseException("unknown context type [{}]", type); } config.remove(ContextMapping.FIELD_TYPE); DocumentMapperParser.checkNoRemainingFields(name, config, indexVersionCreated); return contextMapping; } }
DocumentMapperParser.checkNoRemainingFields(propName, properties, parserContext.indexVersionCreated()); DEPRECATION_LOGGER.deprecated("The [norms{enabled:true/false}] way of specifying norms is deprecated, please use " + "[norms:true/false] instead");
DocumentMapperParser.checkNoRemainingFields(propName, properties, parserContext.indexVersionCreated()); DEPRECATION_LOGGER.deprecated("The [norms{enabled:true/false}] way of specifying norms is deprecated, please use " + "[norms:true/false] instead");
DocumentMapperParser.checkNoRemainingFields(propName, properties, parserContext.indexVersionCreated()); DEPRECATION_LOGGER.deprecated("The [norms{enabled:true/false}] way of specifying norms is deprecated, please use " + "[norms:true/false] instead");
private static ContextMapping load(Map<String, Object> contextConfig, Version indexVersionCreated) { String name = extractRequiredValue(contextConfig, FIELD_NAME); String type = extractRequiredValue(contextConfig, FIELD_TYPE); final ContextMapping contextMapping; switch (Type.fromString(type)) { case CATEGORY: contextMapping = CategoryContextMapping.load(name, contextConfig); break; case GEO: contextMapping = GeoContextMapping.load(name, contextConfig); break; default: throw new ElasticsearchParseException("unknown context type[" + type + "]"); } DocumentMapperParser.checkNoRemainingFields(name, contextConfig, indexVersionCreated); return contextMapping; }
private static ContextMapping load(Map<String, Object> contextConfig, Version indexVersionCreated) { String name = extractRequiredValue(contextConfig, FIELD_NAME); String type = extractRequiredValue(contextConfig, FIELD_TYPE); final ContextMapping contextMapping; switch (Type.fromString(type)) { case CATEGORY: contextMapping = CategoryContextMapping.load(name, contextConfig); break; case GEO: contextMapping = GeoContextMapping.load(name, contextConfig); break; default: throw new ElasticsearchParseException("unknown context type[" + type + "]"); } DocumentMapperParser.checkNoRemainingFields(name, contextConfig, indexVersionCreated); return contextMapping; }
private static ContextMapping load(Map<String, Object> contextConfig, Version indexVersionCreated) { String name = extractRequiredValue(contextConfig, FIELD_NAME); String type = extractRequiredValue(contextConfig, FIELD_TYPE); final ContextMapping contextMapping; switch (Type.fromString(type)) { case CATEGORY: contextMapping = CategoryContextMapping.load(name, contextConfig); break; case GEO: contextMapping = GeoContextMapping.load(name, contextConfig); break; default: throw new ElasticsearchParseException("unknown context type[" + type + "]"); } DocumentMapperParser.checkNoRemainingFields(name, contextConfig, indexVersionCreated); return contextMapping; }