Created
August 1, 2014 20:23
-
-
Save drewr/73e188d95b6d69ac0ee0 to your computer and use it in GitHub Desktop.
Special chars
This file contains 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
curl -XPUT localhost:9200/foo -d'--- | |
mappings: | |
t: | |
properties: | |
f: | |
type: string | |
analyzer: whitespace | |
' | |
curl -XPOST localhost:9200/foo/t\?refresh -d'--- | |
f: "foo & bar" | |
' | |
curl -XPOST localhost:9200/foo/t\?refresh -d'--- | |
f: "foo &bar <3 <3" | |
' | |
curl -XPOST localhost:9200/foo/t\?refresh -d'--- | |
f: "foo&bar" | |
' | |
# OPTION 1 | |
curl localhost:9200/foo/_search -d' | |
{ | |
"query": { | |
"query_string": { | |
"query": "f:*\\&*" | |
} | |
} | |
}' | |
# OPTION 2 | |
curl localhost:9200/foo/_search -d' | |
{ | |
"query": { | |
"wildcard": { | |
"f": "*\\&*" | |
} | |
} | |
}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment