3 ms·
If you truly believe that MySQLs MATCH comes close to be plethora of different queries you can fire at an ES or Solr server, you’re missing some fundamental par
by Xylakant 8y ago
If you truly believe that MySQLs MATCH comes close to be plethora of different queries you can fire at an ES or Solr server, you’re missing some fundamental part of the picture. Sure, it might have been possible to squeeze Lucenes or elasticsearchs query language into something that looks like SQL, but it would still remain a custom SQL dialect which would require substantial domain knowledge to handle. The fundamental problem in that domain is not the query language, it’s knowing which query on which underlying field definition will produce the desired result. Squeezing the query language into some sql-like shape will provide marginal gain at best.
- ddebernardy 8y agoI 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".