elastisch icon indicating copy to clipboard operation
elastisch copied to clipboard

Node info endpoint

Open nha opened this issue 7 years ago • 4 comments

I do not see in the docs (and a quick code scan), a request to get the following request from ES :

http://localhost:9200/

{
"name": "Franz Kafka",
"cluster_name": "elasticsearch_nha",
"version": {
"number": "2.3.4",
"build_hash": "e455fd0c13dceca8dbbdbb1665d068ae55dabe3f",
"build_timestamp": "2016-06-30T11:24:31Z",
"build_snapshot": false,
"lucene_version": "5.5.0"
},
"tagline": "You Know, for Search"
}

It is easy enough to do myself but I thought this could be included in elastisch.

nha avatar Aug 11 '16 15:08 nha

For rest this is (require '[clojurewerkz.elastisch.rest :as er]) (er/get conn "http://localhost:9200")

for native you should be able to use (require ' [clojurewerkz.elastisch.native :as es]) (import '[org.elasticsearch.action.get GetRequest]) (es/get conn (GetRequest. "/" )) which will return an instance of org.elasticsearch.action.support.PlainActionFuture you will have to review java api docs to see how this can be turned into the expected result.

KeeganMyers avatar Aug 11 '16 21:08 KeeganMyers

Feel free to look into a pull request for both. Like everywhere else, we should return immutable Clojure maps and not Java objects ;)

michaelklishin avatar Aug 12 '16 08:08 michaelklishin

For those reading this, I use the following function with the REST api:

(require '[clojurewerkz.elastisch.rest            :as esr])

(defn es-info [conn]
  (esr/get conn (:uri conn)))

nha avatar Aug 22 '16 22:08 nha

Hi I came to this issue looking for my first beginner clojure issue to solve but I think this has already been solved here right? https://github.com/clojurewerkz/elastisch/pull/68/

shouldn't this be closed? or if there is still some work left with this issue, let me know I would like to take a crack at it.

palash25 avatar Mar 14 '20 15:03 palash25