commit 50276ab5b64ef0e27d8280937a9d355f3cfa49dd
parent e6f774f3a0de2b7eae0044e5cf575cef923017c9
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date: Mon, 25 Jan 2010 08:03:35 -0800
fix participants queries
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
@@ -402,7 +402,7 @@ EOS
pos_terms << mkterm(:source_id, opts[:source_id]) if opts[:source_id]
if opts[:participants]
- participant_terms = opts[:participants].map { |p| mkterm(:email,:any, (Redwood::Person === p) ? p.email : p) }
+ participant_terms = opts[:participants].map { |p| [:from,:to].map { |d| mkterm(:email, d, (Redwood::Person === p) ? p.email : p) } }.flatten
pos_terms << Q.new(Q::OP_OR, participant_terms)
end