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

doc_type is no longer supported in ES > 7.x , however use_count_query and use_terms_query still check for it #2424

Open
nickbabkin opened this issue Aug 28, 2019 · 2 comments

Comments

@nickbabkin
Copy link

Hi!

doc_type was completely deprecated in ES > 7.x, however when I use use_count_query or use_terms_query in my rules, rule validation fails:

  File "/usr/local/lib/python3.5/dist-packages/elastalert-0.2.1-py3.5.egg/elastalert/loaders.py", line 373, in load_options
    raise EAException('doc_type must be specified.')
elastalert.util.EAException: doc_type must be specified.

In case ES 7.x cluster is used, this validation shall be omitted.

@nickbabkin
Copy link
Author

This is the exact code block that needs to be changed:
loaders.py

        # Check that doc_type is provided if use_count/terms_query
        if rule.get('use_count_query') or rule.get('use_terms_query'):
            if 'doc_type' not in rule:
                raise EAException('doc_type must be specified.')

@cdalexndr
Copy link

cdalexndr commented Sep 9, 2019

Elasticsearch _type is deprecated, so doc_type option is no longer valid.
More info at: https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

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

No branches or pull requests

2 participants