Skip to content

Instantly share code, notes, and snippets.

@TomonoriSoejima
Last active February 16, 2021 02:14
Show Gist options
  • Save TomonoriSoejima/7696a2509b0d9091ab6c9f7df3efcdd0 to your computer and use it in GitHub Desktop.
Save TomonoriSoejima/7696a2509b0d9091ab6c9f7df3efcdd0 to your computer and use it in GitHub Desktop.
version extract.md
host="http://localhost:9200"
http --quiet get "$host/*/_settings?filter_path=*.settings.index.version&human" | jq -c 'to_entries[] | { index: {_index: "index_version_table", _type:"type"}}, .' |  http --quiet $host/_bulk

printf '{"query": "SELECT * FROM index_version_table"}' | http $host/_sql?format=txt | head

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment