Problem in Visualizations after using "flattened" datatype

Hi,

I just started trying the new "flattened" datatype included in version 7.3 for a field that usually has to many children and I don't usually access them.

Here is an example of my documents:

order {
id: XXX
customer: { ... },
items: { ... },
total_price: 150.0,
transactions: {
...
receipt: { .... huge object ... }
}
}

Until now, I deleted the order.transactions.receipt field to avoid increase the "total_fields" limit of my index settings but I thought that I could change that for setting this field as "flattened".

So I changed my mapping and index all the orders again and I didn't have any problem while indexing, so everything looked normal until I try to create a new visualization in Kibana.

For example, I tryed to calculate the total revenue in a "Metric" visualization by suming the values of the field "order.total_price" but I got the following error:

Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Field [refunds.transactions.receipt._keyed] of type [flattened] does not support custom formats"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"orders","node":"WABj1O30RYGHNg9qorNKIA","reason":{"type":"illegal_argument_exception","reason":"Field [refunds.transactions.receipt._keyed] of type [flattened] does not support custom formats"}}],"caused_by":{"type":"illegal_argument_exception","reason":"Field [refunds.transactions.receipt._keyed] of type [flattened] does not support custom formats","caused_by":{"type":"illegal_argument_exception","reason":"Field [refunds.transactions.receipt._keyed] of type [flattened] does not support custom formats"}}},"status":400}

I tried other types of visualization and it is launched always I'm trying to use the index with the flattened type.

I should highlight that I'm never using the flattened field for any visualization or aggregation. I attached one image showing the error and how I try to create the visualization.

Can anyone tell me why the index become useless when 1 field is set to "flattened"?

Thanks in advance!!

error_kibana|690x401

@timroes needs to shed some light here .

Thanks
Rashmi

Hi Julio,

I am unfortunately unable to reproduce this. Could you please give the following two additional information:

If you go to "Inspect" (in the top menu) and then select Request (instead of Data) from the top right, could you please post the request that was made towards Elasticsearch here.

Also could you go to Management > Index Patterns and open the index pattern for that index on the page that has the order.transactions.receipt field and post a screenshot of that field?

Thanks a lot,
Tim