|
|
|
|
|
by pilif
4467 days ago
|
|
I can't speak for the original poster, but I have three issues with the postgres offering: 1) it has suboptimal support for handling compound words (like finding the "wurst" in "bratwurst"). If the body you're searching is in a language that uses compounds (like german), then you have to use ispell dictionaries which have rudimentary support for compounds and which aren't maintained any more in many cases because ispell has been more or less replaced by hunspell which has far superior compound support which in turn is not supported by postgres. 2) If you use a dictionary for FTS (which you have to if you need to support compounds), the dictionary has to be loaded once per connection. Loading a 20MB dictionary takes about 0.5 seconds, so if you use Postgres FTS, you practically have to use persistent connections or some kind of proxy (like pgbouncer). Not a huge issue, but more infrastructure to keep in mind. 3) It's really hard to do google-suggest like query suggestions. In the end I had to resort to a bad hack in my case. Nothing unsolvable, but not-quite-elastic search either. |
|
2) There is a shared dict extension that load the dict only once. See: http://pgxn.org/dist/shared_ispell/
3) About the suggestions: you should look at pg_trgm contrib extension.