Slide 59
Slide 59 text
pry(main)> Sniffer.enable!;
pry(main)> client = Elasticsearch ::Client.new;
pry(main)> client.search q: 'Saint P Ruby';
D, [2017-11-21T21:13:25.120892 #87793] DEBUG -- : {"port":
9200,"host":"localhost","query":"/_search?
q=Saint+P+Ruby","rq_content_type":"application/
json","rq_user_agent":"Faraday
v0.9.2","rq_accept_encoding":"gzip;q=1.0,deflate;q=0.6,identity;q=0
.3","rq_accept":"*/
*","rq_connection":"close","method":"GET","request_body":"","status
":200,"rs_content_type":"application/json;
charset=UTF-8","rs_content_length":"124","timing":
0.49408299988135695,"response_body":"{\"took\":
224,\"timed_out\":false,\"_shards\":{\"total\":5,\"successful\":
5,\"failed\":0},\"hits\":{\"total\":0,\"max_score\":null,\"hits\":
[]}}"}
Example