Skip to content

Instantly share code, notes, and snippets.

@fernandojmartin
Last active December 16, 2015 21:49
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 fernandojmartin/5502715 to your computer and use it in GitHub Desktop.
Save fernandojmartin/5502715 to your computer and use it in GitHub Desktop.
// This is what I have now:
$ curl -XGET localhost:9200/directorio/_mapping?pretty=true
{
"directorio" : {
"usuario" : {
"properties" : {
"avatar" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"friends" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"friends_qty" : {
"type" : "integer"
},
"iduser" : {
"type" : "integer"
},
"username" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
}
}
}
}
// And this is how it should look like:
{
"mappings": {
"usuario":{
"properties":{
"avatar":{
"type":"string", "index" : "not_analyzed"
},
"friends":{
"type":"string", "index" : "not_analyzed"
},
"friends_qty":{
"type":"integer"
},
"iduser":{
"type":"integer"
},
"username":{
"type":"string", "index" : "not_analyzed"
}
}
},
"grupo":{
"properties":{
"allow_sex":{
"type":"string", "index" : "not_analyzed"
},
"avatar":{
"type":"string", "index" : "not_analyzed"
},
"description":{
"type":"string", "index" : "not_analyzed"
},
"id":{
"type":"integer"
},
"is_open":{
"type":"boolean"
},
"members_qty":{
"type":"integer"
},
"name":{
"type":"string"
},
"user_owner":{
"type":"string", "index" : "not_analyzed"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment