I want to implement free / full text search in my app using Ecto.
I’ve read http://www.rokkincat.com/blog/2015/05/13/postgres-full-text-search-in-ecto but this method does not use the ‘AS DOCUMENT’ syntax I found in the postgres documentation https://www.postgresql.org/docs/9.6/static/textsearch-intro.html#TEXTSEARCH-MATCHING
So does anyone have experience implementing this kind of search in a Phoenix app? If you do, how would you compare it to for instance Elastic Search?
2 Likes
My experience: http://brightball.com/articles/insanity-with-elixir-phoenix-postgresql
http://brightball.com/articles/postgresql-functions-with-elixir-ecto
Love PG full text search. It’s excellent, configurable, performant and easier to manage because you avoid constantly syncing data with an outside system. I don’t remember “as document” during my setups off hand though.
Just try working with it directly in a pg console or sql editor. Beyond that you’re just getting the results of a query.
Thanks for the reply. I’ll read up on Postgres and try it out
I’d recommend to you PGroonga, it’s so fast and really easy to use, and have support for asian languages like chinese and japanese, you can configure in less than 5 min
https://pgroonga.github.io
Greetings
1 Like
Do you possibly have any/all of that full text search code up on GitHub? I’d love to check it out to get a better feel of how you wrote everything in an Elixir project.
Right now I don’t have anything out there beyond what’s in that article. I’m trying to find some time over the next couple of weeks to upgrade to Elixir 1.5 and Phoenix 1.3, set things up properly with contexts, etc and I’ve been debating open sourcing the blog at that point.
2 Likes
Good to know! If/when that happens, I’d love to see the code. Keep us updated