I need to get three distinct lists of values for three different fields, but I would like to avoid querying the database more than once. I am sure the answer it to use the mongodb aggregation framework, however, I am not sure how to use it to select a distinct list of strings?
tags: [{ type: String }],
categories: [{ type: String }],
hashtags: [{ type: String }],
...
let tags = await Model.distinct('tags');
let categories = await Model.distinct('categories');
let hashtags = await Model.distinct('hashtags');