-
Notifications
You must be signed in to change notification settings - Fork 24.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Borrow more tests for runtime fields #61113
Borrow more tests for runtime fields #61113
Conversation
This "borrows" 150 more tests from core for runtime fields, extending the work done in elastic#60931. More precisely, it adds a template to every test that forces dynamic mapping updates to build runtime fields where possible. In particular, `long` and `double` field are created as runtime fields. `string`-typed fields are mimick the out of the box behavior and create a top level `text` field with a `.keyword` multi-field, but this `keyword` multi-field executes a script and loads from source.
Pinging @elastic/es-search (:Search/Search) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Map.entry("script", painlessToLoadFromSource("{name}", type)) | ||
); | ||
Map<String, Object> body = Map.ofEntries( | ||
Map.entry("match_mapping_type", type.equals("keyword") ? "string" : type), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is string
here? Is it the old field type string
from before we had text
and keyword
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is! Dynamic templates mostly uses the types that we use but it uses string
instead of text
or keyword
.
This "borrows" 150 more tests from core for runtime fields, extending
the work done in #60931. More precisely, it adds a template to every
test that forces dynamic mapping updates to build runtime fields where
possible. In particular,
long
anddouble
field are created asruntime fields.
string
-typed fields are mimick the out of the boxbehavior and create a top level
text
field with a.keyword
multi-field, but this
keyword
multi-field executes a script and loadsfrom source.