Class SourceTransforms
java.lang.Object
org.elasticsearch.datageneration.matchers.source.SourceTransforms
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis preprocessing step makes it easier to match the document using a unified structure.static <T> List<T> normalizeValues(List<T> values) static <T,U> List <U> normalizeValues(List<T> values, Function<T, U> transform)
-
Constructor Details
-
SourceTransforms
public SourceTransforms()
-
-
Method Details
-
normalize
public static Map<String,List<Object>> normalize(Map<String, Object> documentMap, Map<String, Map<String, Object>> mappingLookup) This preprocessing step makes it easier to match the document using a unified structure. It performs following modifications:- Flattens all nested maps into top level map with full field path as key (e.g. "a.b.c.d")
- Transforms all field values to arrays of length >= 1
It also makes it possible to work with subobjects: false/auto settings.
- Returns:
- flattened map
-
normalizeValues
-
normalizeValues
-