OpenFarm icon indicating copy to clipboard operation
OpenFarm copied to clipboard

Migrate to MongoDB's Full Text Search?

Open RickCarlino opened this issue 4 years ago • 3 comments

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

  • In 2019, Mongo's full text search seems "good enough" for our use cases.
  • We are using an extremely outdated version of ElasticSearch which will be time consuming to upgrade.
  • ElasticSearch increases our hosting costs because we need to pay a third party vendor to host a database, on top of the fees we already pay for MongoDB hosting.
  • Crop and Guide are the only models that use full text search. The application has very little need for full-text search outside of those use cases.
  • ElasticSearch complicates our setup, confuses new contributors and has historically been problematic during dep upgrades.

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 avatar Sep 03 '19 14:09 RickCarlino

Forgot to CC @Br3nda for commentary.

RickCarlino avatar Sep 03 '19 22:09 RickCarlino

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").

Br3nda avatar Sep 04 '19 00:09 Br3nda

@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).

RickCarlino avatar Sep 04 '19 12:09 RickCarlino