Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.TreeSet;
import java.util.stream.Stream;

class FlattenedSortedSetDocValuesSyntheticFieldLoader implements SourceLoader.SyntheticFieldLoader {
class FlattenedDocValuesSyntheticFieldLoader implements SourceLoader.SyntheticFieldLoader {
private final String fieldFullPath;
private final String keyedFieldFullPath;
private final String keyedIgnoredValuesFieldFullPath;
Expand All @@ -37,15 +37,16 @@ class FlattenedSortedSetDocValuesSyntheticFieldLoader implements SourceLoader.Sy
private List<Object> ignoredValues = List.of();

/**
* Build a loader for flattened fields from doc values.
* Build a loader for flattened fields from either binary or sorted set doc values.
*
* @param fieldFullPath full path to the original field
* @param keyedFieldFullPath full path to the keyed field to load doc values from
* @param keyedIgnoredValuesFieldFullPath full path to the keyed field that stores values that are not present in doc values
* due to ignore_above
* @param leafName the name of the leaf field to use in the rendered {@code _source}
* @param usesBinaryDocValues whether the values are stored using binary or sorted set doc values
*/
FlattenedSortedSetDocValuesSyntheticFieldLoader(
FlattenedDocValuesSyntheticFieldLoader(
String fieldFullPath,
String keyedFieldFullPath,
@Nullable String keyedIgnoredValuesFieldFullPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ public FieldMapper.Builder getMergeBuilder() {
protected SyntheticSourceSupport syntheticSourceSupport() {
if (fieldType().hasDocValues()) {
return new SyntheticSourceSupport.Native(
() -> new FlattenedSortedSetDocValuesSyntheticFieldLoader(
() -> new FlattenedDocValuesSyntheticFieldLoader(
fullPath(),
fullPath() + KEYED_FIELD_SUFFIX,
fieldType().ignoreAbove.valuesPotentiallyIgnored() ? fullPath() + KEYED_IGNORED_VALUES_FIELD_SUFFIX : null,
Expand Down