Open HarushR opened 3 years ago
Pinging @elastic/es-core-features (:Core/Features/Indices APIs)
The problem is not that the first exclude is ignored but that we only apply excludes after first wildcard is seen.
So GET tatiana,al*,-ta*
will also exclude tatiana
, GET tatiana,-tatiana
fill fail with error no such index [-tatiana]
and finally GET tatiana*,-tatiana
will work just fine.
That applies to every API that uses IndexNameExpressionResolver
Thank you @probakowski! Your post allowed me to get my index input parameter working in a Logstash config file. Hopefully someone can update the "Multi-target syntax" documentation here: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/multi-index.html It doesn't mention that exclusion only works if a wildcard is used.
It would be great if exclude could be applied after an alias :)
Elasticsearch version (
bin/elasticsearch --version
): 7.9.3Plugins installed: None.
JVM version (
java -version
): 14OS version: CentOS 7.4
Description of the problem including expected versus actual behavior: When trying to query an index and excluding with wildcard, the first wildcard exclude is not excluded.
Given the indices
tatiana
,virginia
andalina
, the expected result ofGET tatiana,-ta*
is nothing, while the actual response includes the indextatiana
. However,GET tatiana,-al*,-ta*
will not includetatiana
.Steps to reproduce:
tatiana
and remove (exclude) all indices that begin withta*
curl -XGET localhost:9200/tatiana,-ta*
Provide logs (if relevant): -