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

wildcard query should throw a json_parse_exception with error code 400 #117727

Open
astefan opened this issue Nov 28, 2024 · 3 comments
Open

wildcard query should throw a json_parse_exception with error code 400 #117727

astefan opened this issue Nov 28, 2024 · 3 comments
Labels
>bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@astefan
Copy link
Contributor

astefan commented Nov 28, 2024

Description

The wildcard query will throw a json_parse_exception with error code 500 when there is a syntax error in the value provided, while term query for example will throw the same exception wrapped in a x_content_parse_exception but with an error code 400, which I believe is the more correct approach.

Query to test:

{
    "query": {
        "wildcard": {
            "name": {
                "value": "*56\-1*"
            }
        }
    }
}
@astefan astefan added :Search Foundations/Search Catch all for Search Foundations >bug labels Nov 28, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Nov 28, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@martijnvg
Copy link
Member

@astefan Is this issue is a duplicate of #114142? Or is this one different?

@astefan
Copy link
Contributor Author

astefan commented Nov 29, 2024

@martijnvg similar I guess, but that one lacks details, like reproduction steps and which query shows the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

3 participants