Created
May 7, 2013 09:11
-
-
Save javanna/5531326 to your computer and use it in GitHub Desktop.
Wrong mapping using a nested object with same name as its type
This file contains 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 -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