- select_merge: %{
- search_rank:
- fragment(
- """
- ts_rank_cd((setweight(to_tsvector('simple', ?), ?) || setweight(to_tsvector('simple', ?), ?)), to_tsquery('simple', ?))
- """,
- u.name,
- ^name_weight,
- u.nickname,
- ^nickname_weight,
- ^query_string
- )
- }
+ where:
+ fragment(
+ """
+ (setweight(to_tsvector('simple', ?), ?) || setweight(to_tsvector('simple', ?), ?)) @@ to_tsquery('simple', ?)
+ """,
+ u.name,
+ ^name_weight,
+ u.nickname,
+ ^nickname_weight,
+ ^query_string
+ )