Reputation: 9
I have created a collection articles in MongoDB with two text fields topic
and content
on which I have created text indexes. I have created text indexes on these two fields. However, sometimes I need to do text search on topic
, and sometimes I need to do text search on both topic
and content
, so how do I write the query statements for each of them?
I want to be able to do a separate text search for a field in a text index
Upvotes: 0
Views: 29