I am new to MongoDB, so I was wondering how you are looking for a document for one word or another, especially if one word is a phrase and the other is one word.
Here, if we need to look for a text printer or ink, we use the syntax below.
db.supplies.runCommand("text", {search:"printer ink"})
What should I do if I want to find the word “printer ink” or paper? Note that printer ink is a phrase. I tried
db.supplies.runCommand("text", {search:"\"printerink\" paper"})
but it didn’t help, so I hope someone can help me.
source
share