Skip to content

Instantly share code, notes, and snippets.

@brett--anderson
Created December 12, 2012 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brett--anderson/4263982 to your computer and use it in GitHub Desktop.
Save brett--anderson/4263982 to your computer and use it in GitHub Desktop.
Bash script to recreate a bug in Elastic Search whereby separate document fields are merged together to create word combinations that don't actually exist in any individual field
curl -XPUT http://localhost:9200/test/
curl -XPUT http://localhost:9200/_percolator/test/perc_1 -d '{ "query" : { "query_string" : { "query" : "\"fire ready\"" } } }'
curl -XGET http://localhost:9200/test/type1/_percolate -d '{ "doc" : { "title" : "ready for this bon fire.", "text" : "ready for this bon fire." }}'
curl -XDELETE http://localhost:9200/test/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment