阅读背景:

如何检查ElasticSearch客户端是否已连接?

来源:互联网 

I'm working with elasticsearch-js (NodeJS) and everything works just fine as long as long as ElasticSearch is running. However, I'd like to know that my connection is alive before trying to invoke one of the client's methods. I'm doing things in a bit of synchronous fashion, but only for the purpose of performance testing (e.g., check that I have an empty index to work in, ingest some data, query the data). Looking at a snippet like this : (NodeJS) and




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: