Wednesday, April 15, 2015

jq one more time - see only what really matters

Sometimes you can find lot of information noise. Say I want to see only document id and it's content. Check this:
  
 curl -XPOST "http://es1.grey:9200/settings/d/_search?limit=50" -d'
                         {"query": { "match_all": {}}}' | jq ".hits.hits[] | [ ._id,  ._source ]"