openfarmcc / OpenFarm

A free and open database for farming and gardening knowledge. You can grow anything!
https://OpenFarm.cc
MIT License
1.57k stars 242 forks source link

Migrate to MongoDB's Full Text Search? #1063

Open RickCarlino opened 5 years ago

RickCarlino commented 5 years ago

When we started this project almost 6 years ago, full text search for Mongo was not that great.

For the issues noted above, I am recommending that we get off of ElasticSearch and replace all #search() functionality with MongDB full text search.

RickCarlino commented 5 years ago

Forgot to CC @Br3nda for commentary.

Br3nda commented 5 years ago

Is it as good as elastic search? the other option is to upgrade our version of elastic search - there's some really nice functionality we get from searchkick gem on growstuff that finds misspellings, ranks results by popularity (tomato being more commonly planted than tomatillo) and knows about plurals in a dozen languages (searches for "Lillies" finds "lily").

RickCarlino commented 5 years ago

@Br3nda I'm certain it won't be as good as Elastic, but I do think it will be "good enough" for the amount of search we are doing today, with the added benefit of a simplified dev/ci environment, fewer external deps, lower hosting costs, less headaches, etc.. I had some not-so-great luck during my last upgrade attempt, but can revisit it now that the other deps in the project are a bit more manageable (not the case during my last attempt).