How to create index on embedded json document


#1

I have a json document called “sample” like this -
{
“config”:{
“is”:
{
“cd”:[“123456”]
,“dv”:[“dtp”,“tbl”]
,“pid”:[“WXYZ”]
}
}
,“ttl”:“2S”
}

I need to create an index on “dv”. I believe I have to create a property first and then the index. But I am unable to find the exact syntax for both. Can someone please help me out.

FYI I am able to create index on ttl like this -

CREATE PROPERTY sample.ttl STRING
CREATE INDEX TESTON sample(ttl) NOTUNIQUE


#2

Hi @sourav.da

For now the creation of indexes on nested properties is not supported. It is in the roadmap and hopefully it will be available in next months

Thanks

Luigi