From: rlane@club.cc.cmu.edu (Rich Lane)
Subject: [sup-talk] [PATCH] xapian: dont exclude spam/etc in some internal searches
Date: Sat, 25 Jul 2009 12:27:08 -0700 [thread overview]
Message-ID: <1248550028-9703-1-git-send-email-rlane@club.cc.cmu.edu> (raw)
---
bin/sup-dump | 2 +-
bin/sup-sync | 2 +-
bin/sup-sync-back | 2 +-
bin/sup-tweak-labels | 1 +
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/bin/sup-dump b/bin/sup-dump
index c18a767..ba36b21 100755
--- a/bin/sup-dump
+++ b/bin/sup-dump
@@ -25,6 +25,6 @@ index = Redwood::Index.new
Redwood::SourceManager.new
index.load
-index.each_message do |m|
+index.each_message :load_spam => true, :load_deleted => true, :load_killed => true do |m|
puts "#{m.id} (#{m.labels * ' '})"
end
diff --git a/bin/sup-sync b/bin/sup-sync
index 270524a..8e37c74 100755
--- a/bin/sup-sync
+++ b/bin/sup-sync
@@ -213,7 +213,7 @@ begin
num_del, num_scanned = 0, 0
sources.each do |source|
raise "no source id for #{source}" unless source.id
- index.each_message :source_id => source.id do |m|
+ index.each_message :source_id => source.id, :load_spam => true, :load_deleted => true, :load_killed => true do |m|
num_scanned += 1
unless seen[m.id]
next unless m.source_info >= opts[:start_at] if opts[:start_at]
diff --git a/bin/sup-sync-back b/bin/sup-sync-back
index da94bbd..56ac4eb 100755
--- a/bin/sup-sync-back
+++ b/bin/sup-sync-back
@@ -16,7 +16,7 @@ def die msg
exit(-1)
end
def has_any_from_source_with_label? index, source, label
- query = { :source_id => source.id, :label => label, :limit => 1 }
+ query = { :source_id => source.id, :label => label, :limit => 1, :load_spam => true, :load_deleted => true, :load_killed => true }
not Enumerable::Enumerator.new(index, :each_id, query).map.empty?
end
diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels
index a8115ea..8ae5c26 100755
--- a/bin/sup-tweak-labels
+++ b/bin/sup-tweak-labels
@@ -83,6 +83,7 @@ begin
query += ' ' + opts[:query] if opts[:query]
parsed_query = index.parse_query query
+ parsed_query.merge! :load_spam => true, :load_deleted => true, :load_killed => true
ids = Enumerable::Enumerator.new(index, :each_id, parsed_query).map
num_total = ids.size
--
1.6.0.4
next reply other threads:[~2009-07-25 19:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-25 19:27 Rich Lane [this message]
2009-07-27 16:16 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248550028-9703-1-git-send-email-rlane@club.cc.cmu.edu \
--to=rlane@club.cc.cmu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox