What is the best strategy for selecting mongodb entries in which a string value contains a set of words or phrases? I'm thinking of something equivalent to mysql's LIKE function, e.g.
WHERE (TEXT LIKE "% apple %") or (TEXT LIKE "% banana %")
I've seen options that involve tokenizing the string, but this would involve building unigrams for all the text, which would be huge no?
Mongo now supports text search since 2.4. My experience has been pretty positive
http://docs.mongodb.org/manual/applications/text-search/
You start the server with setParameter text search enabled Then enable the index on the collection Then search with runCommand
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With