appbaseio / mirage

:art: GUI for simplifying Elasticsearch Query DSL
http://opensource.appbase.io/mirage
Other
2.21k stars 123 forks source link

Math date support with index name. #28

Open hrqiang opened 7 years ago

hrqiang commented 7 years ago

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.

siddharthlatest commented 7 years ago

@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?

hrqiang commented 7 years ago

@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.

siddharthlatest commented 7 years ago

@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.

hrqiang commented 7 years ago

@siddharthlatest Yes, that works.