Addresses.where(params).or(params2)
.full_text_search(:address, 'Heimdall', :vector=>true)
.order(Sequel.desc(:id))
.paginate(page, limit).all


But this produces error and says:

> PG::InvalidTextRepresentation: ERROR:  invalid input syntax for type json
LINE 1: ...CAST('simple' AS regconfig), (COALESCE("adresses", ''))) @@ t...
                                                             ^
DETAIL:  The input string ended unexpectedly.
CONTEXT:  JSON data, line 1: 


On Tuesday, August 13, 2019 at 11:05:12 PM UTC+3, xura wrote:
>
> Hi,
>
> How can I translate this query to Sequel/Ruby? Does Sequel has ability to 
> handle such queries or do i need to execute raw?
>
> SELECT * FROM contacts WHERE to_tsvector('English', addresses ->> 
> 'address') @@ to_tsquery('Heimdall')
>
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/d5fabc1a-58c7-4192-8a2b-9ab35a91cbff%40googlegroups.com.

Reply via email to