Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Created April 17, 2014 03:45
Show Gist options
  • Save felipelavinz/10951467 to your computer and use it in GitHub Desktop.
Save felipelavinz/10951467 to your computer and use it in GitHub Desktop.
Ejemplo de definición de mapeo para posts en ElasticSearch
{
"post": {
"properties": {
"author": {
"properties": {
"email": {
"type": "string",
"include_in_all": false
},
"fn": {
"properties": {
"family-name": {
"type": "string"
},
"given-name": {
"type": "string"
}
}
},
"id": {
"type": "integer",
"include_in_all": false
},
"login": {
"type": "string",
"index": "not_analyzed",
"omit_norms": true,
"index_options": "docs",
"include_in_all": false
},
"n": {
"properties": {
"family-name": {
"type": "string"
},
"given-name": {
"type": "string"
}
}
}
}
},
"bookmark": {
"type": "string",
"include_in_all": false
},
"entry_content": {
"type": "string",
"boost": 1.15,
"include_in_all": true
},
"entry_id": {
"type": "integer",
"include_in_all": false
},
"entry_summary": {
"type": "string",
"boost": 1.15,
"include_in_all": true
},
"entry_title": {
"type": "string",
"boost": 1.5,
"include_in_all": true
},
"parent": {
"type": "long"
},
"post_type": {
"type": "string",
"include_in_all": false
},
"published": {
"type": "date",
"format": "YYYY-MM-dd HH:mm:ss",
"include_in_all": false
},
"site": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"status": {
"type": "string",
"index": "not_analyzed",
"omit_norms": true,
"index_options": "docs",
"include_in_all": false
},
"taxonomies": {
"properties": {
"name": {
"type": "string",
"include_in_all": false
},
"slug": {
"type": "string",
"boost": 1.2
},
"taxonomy": {
"type": "string",
"index": "not_analyzed",
"omit_norms": true,
"index_options": "docs",
"include_in_all": false
},
"term_id": {
"type": "integer",
"include_in_all": false
},
"term_taxonomy_id": {
"type": "integer",
"include_in_all": false
}
}
},
"thumbnail": {
"type": "string"
},
"updated": {
"type": "date",
"format": "YYYY-MM-dd HH:mm:ss",
"include_in_all": false
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment