Created
July 10, 2013 08:43
-
-
Save radu-gheorghe/5964537 to your computer and use it in GitHub Desktop.
index and search for a value containing #
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
curl -XDELETE localhost:9200/test1 | |
curl -XPUT localhost:9200/test1 | |
curl -XPUT localhost:9200/test1/test/_mapping -d '{ | |
"test": { | |
"properties": { | |
"foo": { | |
"type": "string", | |
"index": "not_analyzed" | |
} | |
} | |
} | |
}' | |
curl -XPOST localhost:9200/test1/test/ -d '{ "foo": "#bar"}' | |
curl -XPOST localhost:9200/test1/_refresh | |
sleep 1 | |
curl localhost:9200/test1/test/_search -d '{ | |
"query": { | |
"term": { | |
"foo": "#bar" | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of ElasticSearch version 1.3.x+
should be