Improve full text search results by unaccent and concatenating fields
Unsure if this will work, but notes from the FOSDEM talk leads me to believe we can do better, although not exactly what we want due to inability to sort some results based on an additional field. (@lambadalambda wrote a blog post about this here: https://blog.soykaf.com/post/postgresl-front-report/)
-
Postgres has an unaccent module. This should help normalize our queries and results a bit.
-
Concatenating fields:
if a full text search query was built off of concatenating our fields such as name
, nickname
, and post_body
(not verbatim field names) we could then have:
account @feld@bikeshed.party
makes post "cheese is good"
and then if we search for "feld cheese" it should produce a match and give us this exact post as the first result because we hit on both the account and the post body.