Details
-
Story
-
Resolution: Unresolved
-
Major
-
None
-
6.6.0
-
None
-
None
-
Hi Team-
I want to create an index where i should be able to index the fields which are subdocument fields of an array and i want to index subdocument fields as well.
Doc sample :
{
"nameId": "1970",
"Category": 002,
"$Type"="ABCD"
"Codes": [{
"Descriptions": {
"fff": "Collaborative abcd",
},
"ConfigurationCode": 0,
"$Type": "BasicType",
"Code": 1,
"EffDtRnge": {
"EndDt": "2021-10-30",
"StrtDt": "2021-06-17" },
]
select count(*) from `t` where nameId= '1970' and `$Type` = 'ABCD' and any enddate in 'Codes' satisfies enddate.EffDtRnge.EndDt='2021-10-30' end
This is my select query.
I created the index - create index on t (`nameId`,`$Type`) where (`$Type`="BasicType");
And the query gives me the output with the count but if i go and do * in of count it shows me no result.
Please help me how should the exact definition should look like when we are trying to index an subdocument of an array and subdoc fields only.
Regards;
Srigopal
Hi Team- I want to create an index where i should be able to index the fields which are subdocument fields of an array and i want to index subdocument fields as well. Doc sample : { "nameId": "1970", "Category": 002, "$Type"="ABCD" "Codes": [{ "Descriptions": { "fff": "Collaborative abcd", }, "ConfigurationCode": 0, "$Type": "BasicType", "Code": 1, "EffDtRnge": { "EndDt": "2021-10-30", "StrtDt": "2021-06-17" }, ] select count(*) from `t` where nameId= '1970' and `$Type` = 'ABCD' and any enddate in 'Codes' satisfies enddate.EffDtRnge.EndDt='2021-10-30' end This is my select query. I created the index - create index on t (`nameId`,`$Type`) where (`$Type`="BasicType"); And the query gives me the output with the count but if i go and do * in of count it shows me no result. Please help me how should the exact definition should look like when we are trying to index an subdocument of an array and subdoc fields only. Regards; Srigopal
-
1