Skip to content

Instantly share code, notes, and snippets.

@unthingable
Last active December 18, 2015 01:59
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 unthingable/5708136 to your computer and use it in GitHub Desktop.
Save unthingable/5708136 to your computer and use it in GitHub Desktop.
elasticsearch ttl: why y no work?
{
"foobar" : {
"pwpage" : {
"dynamic_templates" : [ {
"string_template" : {
"mapping" : {
"index" : "not_analyzed",
"type" : "string"
},
"match" : "*",
"match_mapping_type" : "string"
}
} ],
"_all" : {
"enabled" : false
},
"_parent" : {
"type" : "rtp"
},
"_routing" : {
"required" : true
},
"_ttl" : {
"enabled" : true,
"default" : 86400000
},
"properties" : {
"elapsed" : {
"type" : "double"
},
"end" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"headers" : {
"properties" : {
"hostname" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
}
}
},
"object" : {
"properties" : {
"cookies" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"get_params" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"headers" : {
"type" : "object"
},
"html" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"opener" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"post_params" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"proxy" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"request" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"status" : {
"type" : "long"
},
"url" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
}
}
},
"start" : {
"type" : "date",
"format" : "dateOptionalTime"
}
}
},
"wpage" : {
"dynamic_templates" : [ {
"string_template" : {
"mapping" : {
"index" : "not_analyzed",
"type" : "string"
},
"match" : "*",
"match_mapping_type" : "string"
}
} ],
"_all" : {
"enabled" : false
},
"_parent" : {
"type" : "rtp"
},
"_routing" : {
"required" : true
},
"_ttl" : {
"enabled" : true,
"default" : 86400000
},
"properties" : {
"elapsed" : {
"type" : "double"
},
"end" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"headers" : {
"properties" : {
"hostname" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
}
}
},
"object" : {
"properties" : {
"cookies" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"get_params" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"headers" : {
"type" : "object"
},
"html" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"linked_page" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"opener" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"post_params" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"request" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"status" : {
"type" : "long"
},
"url" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
}
}
},
"start" : {
"type" : "date",
"format" : "dateOptionalTime"
}
}
},
"_default_" : {
"dynamic_templates" : [ {
"string_template" : {
"mapping" : {
"index" : "not_analyzed",
"type" : "string"
},
"match" : "*",
"match_mapping_type" : "string"
}
} ],
"_all" : {
"enabled" : false
},
"_ttl" : {
"enabled" : true,
"default" : 86400000
},
"properties" : { }
}
}
}
{
"foobar": {
"mappings": {
"_default_": {
"_all": {
"enabled": false
},
"_ttl": {
"default": "1d",
"enabled": true
},
"dynamic_templates": [
{
"string_template": {
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match": "*"
}
}
],
"_source": {
"enabled": true
}
},
"pwpage": {
"_all": {
"enabled": false
},
"_parent": {
"type": "rtp"
},
"_ttl": {
"default": "1d",
"enabled": true
},
"dynamic_templates": [
{
"string_template": {
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match": "*"
}
}
],
"_source": {
"enabled": true
}
},
"wpage": {
"_all": {
"enabled": false
},
"_parent": {
"type": "rtp"
},
"_ttl": {
"default": "1d",
"enabled": true
},
"dynamic_templates": [
{
"string_template": {
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match": "*"
}
}
],
"_source": {
"enabled": true
}
}
},
"template": "*",
"settings": {
"index.mapping.ignore_malformed": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment