-
Notifications
You must be signed in to change notification settings - Fork 25.6k
EQL: Disable field extraction for source return #52884
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
Conversation
|
Pinging @elastic/es-search (:Search/EQL) |
astefan
left a comment
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. Left two minor comments.
|
|
||
| // NB: the sortBuilder takes care of eliminating duplicates | ||
| container.fields().forEach(f -> f.v1().collectFields(sortBuilder)); | ||
| sortBuilder.build(source); |
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.
The sortBuilder is still defined above. Needs removal? Also, the two comments above are not needed anymore.
| String now = DateUtils.nowWithMillisResolution().format(DateTimeFormatter.ISO_DATE_TIME); | ||
| StringBuilder sb = new StringBuilder(); | ||
| sb.append("{"); | ||
| for (int i = 0; i < 250; i++) { |
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 would add a comment here explaining the reason for 250 value (that value larger than the 100 doc_values limit in ES). Maybe take the default limit in ES and use here a value made of that limit + 100 or something like that?
|
@elasticmachine run elasticsearch-ci/bwc |
Return the whole source of matching events (cherry picked from commit 79ca586)
Metric mappings have lots of mappings which, in case of individual field selection, can easily hit the limit of maximum doc value fields or automatons.
As fields are not used in EQL, this commit disables field extraction and returns the entire source instead.