Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created December 13, 2010 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimchy/739365 to your computer and use it in GitHub Desktop.
Save kimchy/739365 to your computer and use it in GitHub Desktop.
curl -XPUT localhost:9200/test
curl -XPUT localhost:9200/test/type1/_mapping -d '{
"type1" : {
"properties" : {
"path" : {
"type" : "string",
"index" : "not_analyzed"
}
}
}
}'
curl -XPUT localhost:9200/test/type1/1 -d '{
"path" : "level1/level2/level3"
}'
curl -XGET localhost:9200/test/_search?q=path:level1/*
curl -XGET localhost:9200/test/_search?q=path:level1/*/level3
curl -XGET localhost:9200/test/_search?q=path:level1/level2/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment