Skip to content

Instantly share code, notes, and snippets.

@psykidellic
Created February 9, 2013 07:58
Show Gist options
  • Save psykidellic/4744537 to your computer and use it in GitHub Desktop.
Save psykidellic/4744537 to your computer and use it in GitHub Desktop.
I tend to forget ElasticSearch commands. Here is a list o jog up my memory.
curl -X GET 'http://localhost:9200/beammusic/album/_search?pretty'
@psykidellic
Copy link
Author

The following two seems to be same - show all mappings across all indexes

curl -X GET 'http://localhost:9200/_mapping'
curl -X GET 'http://localhost:9200/_all/_mapping'

Shows all mappings in beammusic index

curl -X GET 'http://localhost:9200/beammusic/_mapping'

Shows the properties of one mapping

curl -X GET 'http://localhost:9200/beammusic/song/_mapping'

Shows document of id 1 of type song

curl -X GET 'http://localhost:9200/beammusic/song/1'

Shows all (or atleast a big amount)

curl -XGET 'http://localhost:9200/beammusic/song/_search?pretty=true&size=100&q=:'

Delete is just about calling DELETE method to a query

curl -XDELETE 'http://localhost:9200/beammusic/song/_search?pretty=true&size=100&q=:'
curl -XDELETE 'http://localhost:9200/beammusic/song/1'

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