const getPropertyThesaurusMap = async (db: Db) => {
  const templateCollection = db.collection<Template>('templates');
  const allTemplates = await templateCollection.find({}).toArray();

  const selectProperties = _.flatMap(allTemplates, t => t.properties?.filter(isSelect) || []);