Questions about fields with dot

Hello, my doc has field in following pattern:

{
“foo”: “hello”,
“foo.bar”: " “world”
}

However it will meet error no matter using dynamic mapping or static mapping. Because there is a conflict that foo has been defined as both object and text.

I have searched internet, but the most suggestion is either replace dot in the original doc, or use dot expend to rename “foo”: “hello” to “foo.xxx”: “hello”.

Wondering if there is a way that do not take “foo.bar” as “foo : { bar }”, but simply take it as a ordinary field?

I am unaware of a way to do this as you describe. The suggestions you mention would be my suggestions as well.