node-elastical
node-elastical copied to clipboard
Support url string
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
URL parser for node-mysql can be found here https://github.com/felixge/node-mysql/blob/master/lib/ConnectionConfig.js#L86
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.
+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://
?
Patches welcome.
Do we use
elasticsearch://
andelasticsearch-ssl://?
makes sense.