commit bbfd0b39a9f44e0af151fda05ae3ef8aa3751b0c
parent 87dcb31f615fe3989aa5a8da9662fd84769fbe75
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date: Sun, 21 Mar 2010 16:33:12 -0700
update sup-tweak-labels query syntax for xapian
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels
@@ -73,11 +73,11 @@ begin
end.map { |s| s.id }
Trollop::die "nothing to do: no sources" if source_ids.empty?
- query = "+(" + source_ids.map { |id| "source_id:#{id}" }.join(" OR ") + ")"
+ query = "(" + source_ids.map { |id| "source_id:#{id}" }.join(" OR ") + ")"
if add_labels.empty?
## if all we're doing is removing labels, we can further restrict the
## query to only messages with those labels
- query += " +(" + remove_labels.map { |l| "label:#{l}" }.join(" ") + ")"
+ query += " (" + remove_labels.map { |l| "label:#{l}" }.join(" OR ") + ")"
end
query += ' ' + opts[:query] if opts[:query]