If I have these two collections:
Book: {
title: String,
description: String
author: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
}
User: {
_id: (generated by mongo)
username: String
}
And I want to index Book for FTS. Can I do it in such a way that it will also be searchable by username even though the usernames are not explicitly stored in the books collection?
In other words, is it possible (or advisable) to index a populated collection?
Thanks