node-elastical icon indicating copy to clipboard operation
node-elastical copied to clipboard

Support url string

Open yocontra opened this issue 11 years ago • 4 comments

Currently mongoose and node-mysql support this so why not ES?

This would replace (optionally)

{
  "host": "elastic.test.com",
  "port": 9200,
  "index": "production"
}

with this (elastic can be replaced with something better)

elastic://elastic.test.com:9200/production

yocontra avatar Oct 01 '13 06:10 yocontra

URL parser for node-mysql can be found here https://github.com/felixge/node-mysql/blob/master/lib/ConnectionConfig.js#L86

yocontra avatar Oct 01 '13 06:10 yocontra

Currently mongoose and node-mysql support this so why not ES?

Good question. The answer is - no one has asked for this :)

elastic://elastic.test.com:9200/production

Not sure if elastic:// is the right protocol name. I think it should be elasticsearch:// For example node-logstash uses this format.

ramv avatar Oct 01 '13 17:10 ramv

+1 for elasticsearch://

I'm Willing to implement this. One problem I see is that ES allows either http or https.

Do we use elasticsearch:// and elasticsearch-ssl://?

deedubs avatar Oct 23 '13 13:10 deedubs

Patches welcome.

Do we use elasticsearch:// and elasticsearch-ssl://?

makes sense.

ramv avatar Oct 23 '13 20:10 ramv