3 ms·
I can't speak for MySQL, as I haven't used it in a while, but I'd pick a properly configured Postgres full text over ES in a heart beat, if only because it mean
by ddebernardy 8y ago
I can't speak for MySQL, as I haven't used it in a while, but I'd pick a properly configured Postgres full text over ES in a heart beat, if only because it means one less dependency (tree) to worry about. (As a bonus, the beauty of Postgres allows to use ES as an index type if you so wish [0].)
Also:
> Squeezing the query language into some sql-like shape will provide marginal gain at best.
... is disingenuous at best. In both examples I raised (and in the ones you'll find if you query the others) the engines have functionality to accept user input pretty much as is - meaning as your typical mom would type it in a search field.
If you need extra criteria from there and the dialect's full text syntactic features, you can use regular SQL conditions (and joins, and aggregates, etc.) on the subset of records found. The most discriminating criteria/index will be the one related to the search query in most cases. And when not, lucky you - your query planner did not hammer everything with the same sledgehammer, thus demonstrating why you should be using SQL.
[0]: https://github.com/zombodb/zombodb https://github.com/zombodb/zombodb
- smsm42 8y agoI'm not sure what "properly configured" means but ES has huge array of options for search which something simple like MATCH (title,body) AGAINST ('database' IN NATURAL LANGUAGE MODE) can't even begin to coming close to cover. Look at their docs, there are literally hundreds of options, dozens of search modes, dozens of analyzers and filters, scoring configurations, and so on and so forth. I am not familiar specifically with Postgres but I highly doubt Postgres supports all that or even a serious part of that - at least natively. What I see at your zombodb link is just a way to make Postgres proxy requests to ES - complete with ES syntax and/or Query DSL. The only difference is that instead of connecting to ES directly you connect to Postgres and then add "SELECT" thing in front of your ES Query DSL. If it makes something easier, fine, but it's not "Postgres full text over ES".