Hello,
Iam using N1Ql query to retrieve docs from a bucket using a date range filtering.
Dates are stored as epoch timestamp in millis as an array.
{
"_class": ,
“field1”: ,
“field2”: ,
“field3”: [1503294290000,1503380690000],
“field4”: ,
“field5”: ,
“field6”: “”,
“field7”: ,
“field8”: “”,
“field9”: “”
}
Schema used to create index :
CREATE INDEX index-name
ON bucket-name
(_class
,field1
,field2
,(all (array i
for i
in field3
end)),field4
,field5
,field6
,field7
,field8
,field9
) WHERE (_class
= “class_name”)
Upto field4 is expected in my N1Ql query.
field5,6,7,8,9 are added bcos those fields are required in the final output.
I wanted to know whether is there any critical points to consider while creating an idex like above.
Is there any limit in the number of fields added in indexing?
Or is there any better way to do the same?