-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Index Patterns with Commas #17147
Comments
I can comment on the index pattern creation situation. We had numerous regression occur when we refactored index pattern creation to React, mainly due to some smart guy (me 😞 ) trying a new technique to prevent the double request we have to send each time the user searches for something. Unfortunately, that approach caused regressions with CCS, aliases, and other built-ins that ES provides if we use their api directly (which we were with our old approach). We decided to stop hitting our heads against a wall and reverted back to using two queries which should have fixed all regressions, including this one. |
For the other issue, this feels like an issue that always existed, but was somewhat masked. @kobelb checked in 5.6 and verified that, for some reason, you could not create index patterns containing a comma. However, in the 6.1 refactor, we changed how we validate an index pattern query which appears to have started allowing commas in index patterns (since they are allowed in ES). But since this wasn't planned/intentional, we didn't do any due diligence around ensuring patterns containing commas worked in other parts of the app. This code will create an array of indices, but if we consider the search query this generates with an index pattern containing a comma, it looks like:
But this query always returns 0 results in ES. But if we change that code to result in either of these:
ES returns results (assuming the rest of the query should match some data). So basically, we need to decide what we actually support here and update the code if necessary. cc @skearns64 |
cc @spalger for thoughts on fixing this |
@chrisronline isn't the the code you linked resolving the list of indexes to query using the field_caps api, which would return resolved index names rather than using |
I'm not seeing how the field_caps is invoked here (but happy to learn if I'm missing something). It looks like the request is just using the title field directly from the index pattern saved object. Because of that, the |
Oh, nm, we removed that. #12814 I really want to support |
Yea my thoughts exactly. I just did something similar: |
The index field currently only accepts either an array of index names or a comma separated string, so for the current API this should be fine. The API could change in the future but I don't think we need to worry about that now. My main concern is other places that are using index patterns and might not be expecting comma separated patterns, ie timelion |
@skearns64 echoed the same sentiment and I think he pinged ML specifically to see if they were using any separate APIs that might not work. I'll see if I can do some spot checking to ensure it works in some other areas. |
@chrisronline I originally reported on this in the forums (https://discuss.elastic.co/t/index-pattern-not-returning-results/123629/6) so thank all you for looking into and fixing. I know that this issue is closed but I wanted to also point out a similar problem occurs when i attempt to create a role that has Thank you. |
If I create the following two indices in Elasticsearch: this-is-my-index-2018.01, this-is-my-index-also-2018.01
Kibana 6.1.1
I am able to create the following index pattern that appears to match the proper indices:
When I go to Discover and try to use this Index Pattern, it's not returning any results. However, if I execute the following query against Elasticsearch directly it returns results:
Kibana 6.2.1
I'm unable to create the following index pattern:
The text was updated successfully, but these errors were encountered: