Skip to content

Instantly share code, notes, and snippets.

@javanna
Created May 7, 2013 09:11
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 javanna/5531326 to your computer and use it in GitHub Desktop.
Save javanna/5531326 to your computer and use it in GitHub Desktop.
Wrong mapping using a nested object with same name as its type
curl -XPOST localhost:9200/index/type/1 -d '
{
"type": {
"id" : "test id",
"title" : "test title"
},
"type2" : {
"id" : "test"
}
}
'
curl -XGET localhost:9200/index/type/_mapping?pretty
curl -XGET localhost:9200/index/type/_search?pretty -d '
{
"query" : {
"term" : {"type2.id" : "test"}
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment