Skip to content

Instantly share code, notes, and snippets.

View lukemorton's full-sized avatar

Luke Morton lukemorton

View GitHub Profile
@karmi
karmi / articles_tags__queries_filters_and_facets_in_elasticsearch.sh
Created January 23, 2011 17:17
Searching and facets in ElasticSearch
# (Re)create the index
#
curl -X DELETE "http://localhost:9200/articles"
curl -X PUT "http://localhost:9200/articles"
# Insert the data
#
curl -X POST "http://localhost:9200/articles/article" -d '{ "name" : "One", "tags" : ["ruby"] }'
curl -X POST "http://localhost:9200/articles/article" -d '{ "name" : "Two", "tags" : ["ruby", "python"] }'
curl -X POST "http://localhost:9200/articles/article" -d '{ "name" : "Three", "tags" : ["java"] }'