another thing that people might want to play around with is partial match. searching for 'jun' with the blog-after code will get
SELECT "articles".* FROM "articles" WHERE (to_tsvector('english', name) @@ to_tsquery('jun') or to_tsvector('english', content) @@ to_tsquery('jun')) ;
id | author_id | name | content | published_at | created_at | updated_at
----+-----------+------+---------+--------------+------------+------------
(0 rows)
where as the following will get Superman (content has the word june) and Robin (junior) as a result
SELECT "articles".* FROM "articles" WHERE (to_tsvector('english', name) @@ to_tsquery('jun:*') or to_tsvector('english', content) @@ to_tsquery('jun:*')) ;
also, there is an additional contrib, pg_trgm, that can help with partial searching:
another thing that people might want to play around with is partial match. searching for 'jun' with the blog-after code will get
where as the following will get Superman (content has the word june) and Robin (junior) as a result
also, there is an additional contrib, pg_trgm, that can help with partial searching:
http://www.postgresql.org/docs/9.1/interactive/pgtrgm.html
and can also do similarity.
like unaccent, pg_trgm is not built by default for a postgres install.
http://www.postgresql.org/docs/9.1/interactive/contrib.html
"When building from the source distribution, these modules are not built automatically, unless you build the "world" target (see step 2)."
unaccent is not built by default for a postgres install. this might be the issue.
if your using rvm, you can't just:
you need to state the gemset too, thus having an accepted .rvmrc that states the gemset is important.
seems to work also. if you don't then you get log messages that are along the lines of: "cannot load such file -- bundler/setup"
at least that was my experience with using the above version of ruby and rails.
also, the whenever gem would default to production. so if your running whenever in development you want to also state: