elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
837 stars 24.8k forks source link

Using multiple valid wildcard filters not returning results #66868

Open drl-max opened 3 years ago

drl-max commented 3 years ago

Elasticsearch version (bin/elasticsearch --version): Docker image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1 Plugins installed: [] Whatever comes with the Docker image JVM version (java -version): Whatever comes with the Docker image OS version (uname -a if on a Unix-like system): Whatever comes with the Docker image Description of the problem including expected versus actual behavior: The documentation for the _cat/templates API states that it supports using a comma-separated list of wildcard filters, but I'm finding that it's not working. In fact, it appears to guarantee zero results regardless of the filters validity.

I've experienced the same behavior using the NPM module and the dev console in Kibana 7.7.1. My provided example uses the _cat/templates endpoint, but I've had the same issue with _cat/indices and _cat/aliases too. Steps to reproduce: Create some templates:

PUT _template/tmpl1-aoeu
{ "index_patterns": ["ignore"] }

PUT _template/tmpl2-ueoa
{ "index_patterns": ["ignore"] }

Using one wildcard filter returns both templates

GET _cat/templates/tmpl*?v

=> 

name       index_patterns order version
tmpl1-aoeu [ignore]       0     
tmpl2-ueoa [ignore]       0     

Using multiple valid wildcard filters returns nothing

GET _cat/templates/tmpl1-*,tmpl2-*?v

=>

name index_patterns order version

Even something vacuous has the same result

GET _cat/templates/*,*?v

=>

name index_patterns order version
elasticmachine commented 3 years ago

Pinging @elastic/es-core-features (Team:Core/Features)

joegallo commented 3 years ago

Tangentially related to #65667