Skip to content

Instantly share code, notes, and snippets.

@brett--anderson
Created May 9, 2012 06:29
Show Gist options
  • Save brett--anderson/2642394 to your computer and use it in GitHub Desktop.
Save brett--anderson/2642394 to your computer and use it in GitHub Desktop.
Elasticsearch setup to demonstrate stemming with phrases
curl -XPUT http://localhost:9200/test/ -d '{ "index" : { "analysis" : { "analyzer" : { "default" : { "tokenizer": "standard", "filter" : ["standard", "my_snow"] }}, "filter" : {"my_snow" : { "type" : "snowball", "language" : "English" }}}}}'
curl -XPUT http://localhost:9200/_percolator/test/perc_1 -d '{ "query" : { "query_string" : { "query" : "\"empire\"" } } }'
curl -XGET http://localhost:9200/test/type1/_percolate -d '{ "doc" : { "field1" : "empire" }}'
curl -XGET http://localhost:9200/test/type1/_percolate -d '{ "doc" : { "field1" : "empires" }}'
curl -XDELETE http://localhost:9200/test/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment