Escaping dots

Hello guyz,

I'm trying to map a dynamic dictionary and i'm having problems with some keys.
Picture this example.


I get this error "Can't merge a non object mapping [] with an object mapping []" because Elasticsearch is spliting my keys by the dots and indexing them hierarchically.

Meaning the first key:value pair is index as "text" but the second is mapped as an "object".

Is there a way to disable this behavior? Or a way to escape the dot character instead of a simple replace for "_"?


Dots are special syntax in field names. They represent hiearchy within the json data of the document. So windows.user.home is an object field called windows, containing an object field called user, containing a string field called home. When you then add windows.user.home.desktop, it expects windows.user.home to be an object field, but you already have it mapped as a string.

In your case the best thing to do is replace dot with some other character, like underscore as you suggested.

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