I'm probably missing the obvious, but I'm curious why you would place the JSON inside a tag in the HTML. Why wouldn't a user who is interested in the JSON just append .json to the URL?
Ok. I think I've finally figured it out. You have to wrap all of the query strings in plainto_tsquery, so wherever you have 'Lex Luthor', you need it to be plainto_tsquery('Lex Luthor').
So I have a scope called organization_name I use like this:
Fantastic! This is so helpful, Ryan. Thanks.
I'm probably missing the obvious, but I'm curious why you would place the JSON inside a tag in the HTML. Why wouldn't a user who is interested in the JSON just append .json to the URL?
Thanks.
Ok. I think I've finally figured it out. You have to wrap all of the query strings in plainto_tsquery, so wherever you have 'Lex Luthor', you need it to be plainto_tsquery('Lex Luthor').
So I have a scope called organization_name I use like this:
HTH
Did you ever figure this out? I've got the same issue?
Do you think this solution could handle a system with a single model but millions (around 4M) of records?