Elasticsearch (NO log stash) - Keys starting with dot in JSON field

Hi,

Sorry for bothering with this, but I can not resolve it yet.
I need to ingest a JSON type field but some of the keys starts with dots, something like this:

{
'.house.door' : 'nice',
'.car.window' : 'blue'
}

I tried take the whole json as a string but the upstream app needs to get a JSON when query.
I tried to convert all keys to strings, but I am having an error of "failed to parse","caused_by":{"type":"illegal_argument_exception","reason":"field name cannot contain only whitespace:"

I tried more things, but not important to note. I can not strip out the initial dot from the keys, the upstream app need it.

Any idea,
Thank you, I appreciate.

M

Dot is used as a field separator in Elasticsearch so I believe you will need to restructure the documents in order to index them into Elasticsearch.

2 Likes

Thank you Christian !
I am fraid I have to dump my json.

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