I am creating a search engine mongoose. Now, how I can do when the query finds a word in the database, the query can inform me that the word was found ?.
Example: ... query.and ([{color: 'green'}, {color: 'gray'}, {color: 'blue'}]) ....
The query returns the matches found in the database, but I need to know what colors or words found in the query, if possible, at the time that this query is running.