Skip to content

Commit

Permalink
Allow runtime fields to depend on one another
Browse files Browse the repository at this point in the history
This updates a test so that runtime fields depend on one another and
fixes support for it.
  • Loading branch information
nik9000 committed Jul 15, 2020
1 parent 719ef1f commit 70f7390
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ MappedFieldType failIfFieldMappingNotFound(String name, MappedFieldType fieldMap

public SearchLookup lookup() {
if (lookup == null) {
lookup = new SearchLookup(getMapperService(),
mappedFieldType -> indexFieldDataService.apply(mappedFieldType, fullyQualifiedIndex.getName()));
lookup = new SearchLookup(getMapperService(), this::getForField);
}
return lookup;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ setup:
type: script
runtime_type: keyword
script: |
String dow = doc['timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT);
if (dow.startsWith('T')) {
value(dow);
for (String dow: doc['day_of_week']) {
if (dow.startsWith('T')) {
value(dow);
}
}
- do:
Expand Down

0 comments on commit 70f7390

Please sign in to comment.