{
“Contract” : “1”
“CustomerID”:“778358358”
“AccountID”: “37537853875”
“Products”:[“A”,“B”,“C”,“D”]
}
Here is a sample structure of our couchbase document
There are around 10M documents we have in couchbase with different values of customer id and account id
Also products that customer take are not alike and varies
For a given contract and customer combination we would like to obtain distinct list of account id’s and distinct list of products
At the moment we have indexes on all of the 4 fields individually and obtaining this distinct set is not really performant.
Any suggestions on this kind of pattern please?