Indexing on objects within an array, then querying on them

#1

We have the example doc structure below. I want to create an index on the following fields: startDate, endDate, type, category, can sV. our doc will grow in the furture, but the other data elements are irrelevant for this exercise. How can I create an index on elements in an array.

I have created this index : * idx_combine_ns1 on ["sV","category","type","startDate","endDate"]

{
“records”: [
{
“endDate”: “2019-09-10”,
“category”: “SH”,
“type”: “01”,
“startDate”: “2019-09-02”,

},
{
  "endDate": "2019-09-11",
  "category": "SY",
  "type": "01",
  "startDate": "2019-09-12",
}

],
“sV”: “0000127123”,
“sT”: “Mehul”
}

#2

At present you can only index single ARRAY field and query on that efficiently using N1QL+GSI index as described here https://docs.couchbase.com/server/6.0/n1ql/n1ql-language-reference/indexing-arrays.html, You can still apply filters on other fields as post index scan.

Other option is use FTS search