I have a collection with repeated values for columns in the documents. I want to query for distinct values of multiple fields(System, subsystem) combination. Below is a sample data:
"System" : "training", "subsystem": "user", "ccid": "post", ret: 0
"System": "training", "subsystem": "user", "ccid": "test", ret: 1
"System": "training", "subsystem ":"cour", "ccid":"sample", ret:0
I tried to use the aggregate from the other links, but it's not resolving in java for me. Could you please share me a sample java code using aggregate or map-reduce or any of the suitable methods