Created
August 17, 2012 03:09
-
-
Save dylanahsmith/3375594 to your computer and use it in GitHub Desktop.
elasticsearch query_string with analyze_wildcard default operator bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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