Created
May 13, 2012 12:04
-
-
Save kimchy/2688072 to your computer and use it in GitHub Desktop.
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/test | |
curl -XPUT localhost:9200/test -d '{ | |
"mappings" : { | |
"demo" : { | |
"properties" : { | |
"demostring" : { | |
"type" : "string", | |
"analyzer" : "whitespace" | |
} | |
} | |
} | |
} | |
}' | |
curl -XPUT localhost:9200/test/demo/1 -d '{ | |
"demostring" : "One/Two" | |
}' | |
curl -XPUT localhost:9200/test/demo/2 -d '{ | |
"demostring" : "One Two" | |
}' | |
curl localhost:9200/test/_search -d '{ | |
"query" : { | |
"match_all" : {} | |
}, | |
"facets" : { | |
"demostring" : { | |
"terms" : { | |
"field" : "demostring" | |
} | |
} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment