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

ES isn't throwing an error when both categorization_filters and categorization_analyzer are given. #82629

Closed
V1NAY8 opened this issue Jan 14, 2022 · 2 comments · Fixed by #82628
Assignees
Labels
>bug Team:ML Meta label for the ML team v8.1.0

Comments

@V1NAY8
Copy link

V1NAY8 commented Jan 14, 2022

Elasticsearch version (bin/elasticsearch --version): 8.1.0-snapshot

Plugins installed: [] platinum version of ES

JVM version (java -version):1.8

OS version (uname -a if on a Unix-like system): Windows

Description of the problem including expected versus actual behavior:
Issue was found when tests were failing in elasticsearch-py in the following file
rest-api-spec/test/platinum/ml/categorization_agg.yml

Steps to reproduce:

In the following section

  - do:
      catch: /\[categorization_filters\] cannot be used with \[categorization_analyzer\]/
      search:
        index: to_categorize
        body: >
          {
            "size": 0,
            "aggs": {
              "categories": {
                "categorize_text": {
                  "field": "text",
                  "categorization_filters": ["foo"],
                  "categorization_analyzer": "english"
                }
              }
            }
          }

ES isn't throwing an error when both categorization_filters and categorization_analyzer are given.

Can be found in : https://clients-ci.elastic.co/job/elastic+elasticsearch-py+pull-request/449/PYTHON_CONNECTION_CLASS=urllib3,PYTHON_VERSION=3.9,STACK_VERSION=8.1.0-SNAPSHOT,TEST_SUITE=platinum,label=linux/consoleFull

@V1NAY8 V1NAY8 added >bug needs:triage Requires assignment of a team area label labels Jan 14, 2022
@sethmlarson sethmlarson added Team:ML Meta label for the ML team and removed needs:triage Requires assignment of a team area label labels Jan 14, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@V1NAY8
Copy link
Author

V1NAY8 commented Jan 14, 2022

cc @benwtrent @sethmlarson

@benwtrent benwtrent self-assigned this Jan 14, 2022
benwtrent added a commit that referenced this issue Jan 18, 2022
…ependent (#82628)

Depending on how the input is parsed, we may not validate that the categorization_analyzer isn't set when the filters are present.

This commit addresses this bug.

closes #82629
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Team:ML Meta label for the ML team v8.1.0
Projects
None yet
4 participants