mirage icon indicating copy to clipboard operation
mirage copied to clipboard

Math date support with index name.

Open hrqiang opened this issue 9 years ago • 4 comments

For many of our index, like the one from logstash, it's date based. So I would like to see if is it possible to have something like <MY_INDEX-{now/d}> for index(appName). I tried <MY_INDEX-{now%2Fd}>, it's getting 200 OK for mapping response. But there is pop up said authentication error. I guess it's because the response doesn't exactly match the index name.

hrqiang avatar Nov 15 '16 19:11 hrqiang

@hrqiang Mirage only works for a single index currently. An authentication error can happen because of either appname or elasticsearch cluster URL not being interpreted correctly.

Which version of ES are you using? And how are you using it - localhost or hosted somewhere?

siddharthlatest avatar Nov 15 '16 19:11 siddharthlatest

@siddharthlatest I'm using 2.2 version of ES, but I can try it on 5.0. I'm using it with chrome extension to work around the CORS issue. I'm using it on a hosted environment. The <MY_INDEX-{now%2Fd}> is the closest one I got. Which create a request /%3CMY_INDEX-%7Bnow%2Fd%7D%3E/_mapping/ and get a successful response. However, it shows "It looks like your app name, username, password combination doesn't match. Check your url and appname and then connect it again." and no error in console. I think there are some validation stop proceeding, but I'm thinking this might be a simple fix.

hrqiang avatar Nov 15 '16 19:11 hrqiang

@hrqiang I see the issue title as math date support for index name, we don't do that currently. Can you verify if the index name (as a string) works? We can then treat this as a possible enhancement.

siddharthlatest avatar Nov 15 '16 19:11 siddharthlatest

@siddharthlatest Yes, that works.

hrqiang avatar Nov 15 '16 19:11 hrqiang