I'm building an application in node/express, using mongoose and mongodb for data.
I have a "games" collection in mongo that has tens of thousands of games.
Each game has a "title", and I would like to be able to search for a title (e.g. halo 2) and have the results display in a user friendly order.
Halo 2 should come before Halo 5, and irrelevant results should not be included.
Also, insane results should be excluded: e.g. query for "halo combat evolved" should not return "Evolve" as the highest scored result.
Ultimately, I'll be querying this from mongoose in my node app, but for the process of prototyping I've just been using the mongo console...
Here is a sample of what I've tried (which ultimately failed):
db.games.find(
{$text: {$search: "halo combat evolved"}},
{score: {$meta: "textScore"}}
)
And here is a print screen of the results, sorted by score: