Skip to content
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

[Transforms] Add support for search-time runtime fields to transforms #65147

Closed
droberts195 opened this issue Nov 17, 2020 · 3 comments
Closed

Comments

@droberts195
Copy link
Contributor

Since #64374 Elasticsearch has the option to have search-time runtime fields.

We should allow these to be used in transforms.

We may want to ban certain critical fields in the transform configuration from being runtime fields if having them unindexed will kill performance. (For example, fields that we need to sort on, or do terms searches efficiently on.)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

@hendrikmuhs
Copy link

We may want to ban certain critical fields in the transform configuration from being runtime fields

👍 I am concerned by fields in the group_by in a transform that runs in continuous mode. If I understand correctly a terms query on a runtime field would cause a full scan of the source.

@nik9000 is this correct?

However, we have the situation already and we do not ban certain configuration at the moment, but give a performance warning. The problem is similar to using a script in the group_by. The warning is created, if we do not find at least one non-scripted group_by.

In summary the problem applies to 3 cases:

  • search based rt-fields
  • mapping based rt-fields
  • scripts in group_by

As stated, right now there is no ban, but a warning, I am open for discussing this. However banning rt-fields as group_by in general is in my opinion not required. If you have another non-scripted group_by performance is usually ok. I saw cases with 7 other group_by's and only the 8th was using a script.

@przemekwitek
Copy link
Contributor

Search-time runtime fields are now supported in Transform.
They are never banned, even if performance would be affected. Audit warnings are emitted if all the group-by fields or a sync time field is a search-time runtime field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants