Skip to content

Instantly share code, notes, and snippets.

@lorenzoplanas
Created December 12, 2012 09:52
Show Gist options
  • Select an option

  • Save lorenzoplanas/4266485 to your computer and use it in GitHub Desktop.

Select an option

Save lorenzoplanas/4266485 to your computer and use it in GitHub Desktop.
curl -XPUT http://localhost:9200/users/_mapping -d '{
"user" : {
"properties" : {
"author" : {
"type" : "string",
"analyzer" : "string_lowercase"
}
}
}
}'
curl -XPOST "http://localhost:9200/users/user" -d ' {"author": "David", "name":"Jack Web3"}'
curl -XGET 'http://localhost:9200/users/user/_search' -d '{
"query" : {
"term" : { "author" : "david" }
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment