That’s pretty vague Jack. I can see the plan is breaking the search phrase into individual words, but even enclosing it in quotes does not help. I’ve also tried rebuilding the entire index to no avail. I think Mongo should be smart enough to know that if there are 150 messages with rid we don’t need to do FTS on 300,000 messages - and even so, why is it so slow?
Even when I remove all other criteria it is very slow.
The bigger picture issue is that I am not the author of Rocketchat so I essentially have no real control over how it builds queries. I can only say that Mongo doesn’t seem to be properly using the FTS index in this case - or I need to adjust my config to get it to perform.
I’m seeking real concrete advice. If you have experience in this area and want to DM me, we are willing to offer compensation for direct support.