-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
New TermsEnum returns 404 on non-existent subtraction indexes e.g. (logs-*,-elastic-cloud-logs-*) instead of 200 #75155
Labels
>bug
needs:triage
Requires assignment of a team area label
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Comments
FrankHassanabad
added
>bug
:Search/Search
Search-related issues that do not fall into other categories
needs:triage
Requires assignment of a team area label
labels
Jul 8, 2021
Pinging @elastic/es-search (Team:Search) |
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this issue
Jul 9, 2021
This commit changes the default indices options of the new terms enum API to be consistent with _search. This change also fixes the shards statistics in the response when ccs is involved. Closes elastic#75155
jimczi
added a commit
that referenced
this issue
Jul 9, 2021
This commit changes the default indices options of the new terms enum API to be consistent with _search. This change also fixes the shards statistics in the response when ccs is involved. Closes #75155
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this issue
Jul 9, 2021
This commit changes the default indices options of the new terms enum API to be consistent with _search. This change also fixes the shards statistics in the response when ccs is involved. Closes elastic#75155
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this issue
Jul 9, 2021
This commit changes the default indices options of the new terms enum API to be consistent with _search. This change also fixes the shards statistics in the response when ccs is involved. Closes elastic#75155
jimczi
added a commit
that referenced
this issue
Jul 9, 2021
jimczi
added a commit
that referenced
this issue
Jul 9, 2021
This commit changes the default indices options of the new terms enum API to be consistent with _search. This change also fixes the shards statistics in the response when ccs is involved. Closes #75155
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
>bug
needs:triage
Requires assignment of a team area label
:Search/Search
Search-related issues that do not fall into other categories
Team:Search
Meta label for search team
Description of the problem including expected versus actual behavior:
On security solutions when we use the KQL autocomplete we are getting back errors from Kibana and noticed that Kibana swapped from aggregations to using the new terms enum API here: elastic/kibana#100174
Tracing it down to the NewTermsEnum functionality and PR: #66452, and doc reference here:
https://www.elastic.co/guide/en/elasticsearch/reference/master/search-terms-enum.html
We noticed that the NewTermsEnum returns a 404 error if a subtraction index does not exist where in the aggs
_search
older behavior it would never return 404 even if the index does not exist if you're trying to subtract it.Expected behavior:
You can include a subtraction of a non-existent index with an existent index for the new terms API such as
POST /logs-*,-*elastic-cloud-logs-*/_terms_enum
and it will not return an error if it doesn't exist and have the same behavior of_search
Actual behavior:
terms enum returns an error when subtracting an index which doesn't exist.
Steps to reproduce:
logs-01
in dev toolselastic-cloud-logs
Then perform this query in dev tools to see NewTermsEnum return a 404 on the subtraction index:
Blows up with this message:
However, if you use the aggs version it it returns a 200 with results regardless if the
elastic-cloud-logs
exists or not:Workaround
Within Kibana on security solutions you can set the aggs version like so in your
kiban.yml
file so that autocomplete will work with subtraction indexes againElasticsearch version (
bin/elasticsearch --version
):8.0.0
JVM version (
java -version
):11.0.2
OS version (
uname -a
if on a Unix-like system):Darwin MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: