Skip to content

Instantly share code, notes, and snippets.

@dylanahsmith
Created August 17, 2012 03:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dylanahsmith/3375594 to your computer and use it in GitHub Desktop.
Save dylanahsmith/3375594 to your computer and use it in GitHub Desktop.
elasticsearch query_string with analyze_wildcard default operator bug
#!/bin/sh
curl -XDELETE localhost:9200/test
curl -XPUT 'http://localhost:9200/test/doc/1' -d '{
"message" : "apples oranges"
}'
curl -XPUT 'http://localhost:9200/test/doc/2' -d '{
"message" : "apples"
}'
curl -XPUT 'http://localhost:9200/test/doc/3' -d '{
"message" : "oranges"
}'
curl -XPOST 'http://localhost:9200/test/_refresh'
curl -XGET 'localhost:9200/test/doc/_search?pretty=true' -d '{
"query": {
"query_string": {
"query": "apples-oranges*",
"default_operator": "and",
"analyze_wildcard": true
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment