> Yep. The indexed data is different for each user depending on the permissions.
> So the same search term will return completely different results for each 
> user and depending on the current context (subdomain).

Okay. I'm doing something similar at the moment with ElasticSearch
(via the Tire gem). The trick is just having the right flags in the
index and adding a filter (actually, a boolean query) based on the
user's permissions when building the query.

Exactly how you do it will depend on the details of your schema and
data. If each user's data is completely separate, another option with
ElasticSearch is to use a different index for each user.

Not sure if there are other things that specifically address this use
case. PG may allow you to do a join before applying the FTS part. PG
in testing sounds fine to me, unless you have an inflexible CI
environment to think about.

Cheers,
Chris

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to