Dots in index and searching

I am pretty new to ES: I have to create an index which is dot seperated something like,

and the contents is
"noise" : "25",
"temperature" : 33,
"pressure" : 112

where noise:2019-08-01Txxxxx is the ID of the document.

I am trying to do a SQL search
"query": "SELECT * FROM '' WHERE noise < 25"

I am getting an input mismatch exception
mismatched input '''' expecting {'(',

I am wondering if this is allowed, is there a better practice for storing groups and subgroup and have unique documents based on timestamp ?!

some tips would be helpful

The issue is, in fact, with how you name the index. When reserved characters are used in the name of the index, you should use double quotes. Single quotes and double quotes have different meaning in SQL. More about this here.

So, your request should look like "query": "SELECT * FROM \"\" WHERE noise < 25".

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