-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add the ScriptService to the field parser config #60933
Add the ScriptService to the field parser config #60933
Conversation
This makes parsing runtime fields much simpler.
Pinging @elastic/es-search (:Search/Search) |
@romseygeek I've opened this one against the runtime fields branch which lets me verify that it solves my problems. If you like it I'd like to cherry pick it over to master and 7.x. |
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.
Huh, that was easier than I was expecting it to be. I left one grammar nit, other than that LGTM. I'm fine with this staying in the runtime fields branch for now, better to have something that actually uses the ScriptService when it's added.
@@ -146,14 +150,21 @@ public DateFormatter getDateFormatter() { | |||
|
|||
protected Function<String, SimilarityProvider> similarityLookupService() { return similarityLookupService; } | |||
|
|||
/** | |||
* The {@linkplain ScriptService} to compile scripts needs by the {@linkplain Mapper}. |
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.
s/needs/needed by/
Sure! If we start to see a bunch of merge conflicts I might bring this up again! |
Thanks @romseygeek ! |
match: | ||
animal: cow | ||
- match: {hits.total.value: 1} | ||
- match: {hits.hits.0._source.animal: cow} |
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 was wondering if it would be possible to have some other way of testing this besides a yaml test, a single node test would also be good I think
This makes parsing runtime fields much simpler.
We'd initially resisted doing this but all of our other integration options
proved more troublesome.