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

Unable to create Time-based index pattern with wildcard #4633

Closed
sathieu opened this issue Aug 11, 2015 · 1 comment
Closed

Unable to create Time-based index pattern with wildcard #4633

sathieu opened this issue Aug 11, 2015 · 1 comment

Comments

@sathieu
Copy link

sathieu commented Aug 11, 2015

[logs-*-]YYYY.MM.DD doesn't match logs-syslog-20150811.

This comes from

return existingIndex === parsed.format(indexPattern.id);
:

          var matches = all.filter(function (existingIndex) {
            var parsed = moment(existingIndex, indexPattern.id);
            return existingIndex === parsed.format(indexPattern.id);
          });

NB: Here we have:

existingIndex == 'logs-syslog-20150811'
indexPattern.id == '[logs-*-]YYYY.MM.DD'
parsed.format(indexPattern.id) == 'logs-*-2015.08.11'

Workaround is to change to:

          var matches = all.filter(function (existingIndex) {
            var parsed = moment(existingIndex, indexPattern.id);
            var formatted = parsed.format(indexPattern.id);
            return (existingIndex === formatted) || (formatted.indexOf('*') != -1);
          });

NB: Consider the above patch public-domain. you can merge it (I won't sign the CLA).

@rashidkpc
Copy link
Contributor

We're deprecating time based indices, see here: #4342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants