* [sup-talk] [PATCH] xapian: dont exclude spam/etc in some internal searches
@ 2009-07-25 19:27 Rich Lane
2009-07-27 16:16 ` William Morgan
0 siblings, 1 reply; 2+ messages in thread
From: Rich Lane @ 2009-07-25 19:27 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [sup-talk] [PATCH] xapian: dont exclude spam/etc in some internal searches
2009-07-25 19:27 [sup-talk] [PATCH] xapian: dont exclude spam/etc in some internal searches Rich Lane
@ 2009-07-27 16:16 ` William Morgan
0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2009-07-27 16:16 UTC (permalink / raw)
Applied, thanks.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-27 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-25 19:27 [sup-talk] [PATCH] xapian: dont exclude spam/etc in some internal searches Rich Lane
2009-07-27 16:16 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox