i wanna let users search products which may be books, cd’s dvd’s In the case of books they have to be able to search by or including title, author, subject, etc different types of products have many item_properties and there’s a join table to associate products with properties just got the shopping cart working with checkout now i need to move on to pagination and search pagination is a quick easy thing; i’m gonna use pagy another site of mine uses elasticsearch and when i wanna develop the site i have to start the elasticsearch service on my machine and off hand I don’t even remember how to set elasticsearch up Should I use it?
ElasticSearch is not necessary. It is a heavy-weight solution in terms of integration complexity, maintenance complexity, and the amount of features you get.
If you’re using Postgres for your database, I would recommend starting out with Postgres full-text search. You will find a lot of articles if you search for:
rails postgres full text. There’s even an official rails guide on the topic.
I’m using mysql, does that mean i don’t have to read it?
One of the reasons I would use elasticsearch is because I’m guessing maybe it would save me the work of having to program complex search routines for my associations but I’ve always had the problem that elasticsearch brings down my development machine This desktop with a modern day cpu and 8gb ram freezes up with elasticsearch running Any ideas?
I believe MySQL also has some way of doing full text search. Look into that.
Don’t you have to ship all your data into elasticsearch anyway? Is it that different to caching searchable data in your existing database?
You can always start with Pure SQL queries, and refactor later as complexity increases. @fugee_ohu