Mapping all Bools as String

When my logstash starts it sends a template to ES where I set the mappings for various fields. I'm getting a lot of conflicts on a lot of fields(150+) that I do not have individual mappings for. These are dynamic as they are the results of json parsing.

Is it possible to just save all boolean values as string?

                "bool_fields": {
                    "match": "*",
                    "match_mapping_type": "boolean",
                    "mapping": {
                        "type": "keyword",
                        "index": true
                    }
                }

I tried adding this to my template, but it doesn't appear to be working. I could limit it this to fields that start with comp, my fields can be like [comp][result][status], as almost all the fields are the sub elements of comp.

In good news this worked for me in the end:

			{
            "boolean_fields": {
                "match": "cmp*",
                "match_mapping_type": "boolean",
                "mapping": {
                    "type": "keyword",
                    "index": true,
                    "norms": false,
                    "ignore_above": 10000
                }
            }
		}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.