Skip to content

Instantly share code, notes, and snippets.

@sanjid133
Created January 8, 2020 11:56
Show Gist options
  • Save sanjid133/98d623f240acddd8a16a68cee28fad38 to your computer and use it in GitHub Desktop.
Save sanjid133/98d623f240acddd8a16a68cee28fad38 to your computer and use it in GitHub Desktop.
{
"mapping": {
"dynamic_templates": [
{
"product_objects": {
"path_match": "product_summary.info.*",
"match_mapping_type": "object",
"mapping": {
"dynamic": "strict",
"properties": {
"product": {
"properties": {
"price": {
"type": "double",
"doc_values": true
},
"pid": {
"type": "keyword",
"doc_values": true
},
"ptype": {
"type": "keyword",
"doc_values": true
}
}
},
"total": {
"type": "double",
"doc_values": true
}
},
"type": "object"
}
}
}
],
"properties": {
"@timestamp": {
"type": "date"
},
"daily": {
"type": "double"
},
"organization_id": {
"type": "keyword"
},
"overall": {
"type": "double"
},
"product_summary": {
"properties": {
"info": {
"properties": {
"5e1461b7ed2f08481bb5fa48": {
"dynamic": "strict",
"properties": {
"product": {
"properties": {
"pid": {
"type": "keyword"
},
"price": {
"type": "double"
},
"ptype": {
"type": "keyword"
}
}
},
"total": {
"type": "double"
}
}
},
"5e1461b8ed2f08481bb5fa50": {
"dynamic": "strict",
"properties": {
"product": {
"properties": {
"pid": {
"type": "keyword"
},
"price": {
"type": "double"
},
"ptype": {
"type": "keyword"
}
}
},
"total": {
"type": "double"
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment