Subject: [sup-talk] [PATCH 1/2] xapian: fix MAX_DATE

From: [email-masked] (Rich Lane)
Date: Mon, 27 Jul 2009 20:19:29 -0700

---
 lib/sup/xapian_index.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
index 303b4d0..6358a20 100644
--- a/lib/sup/xapian_index.rb
+++ b/lib/sup/xapian_index.rb
@@ -14,7 +14,7 @@ class XapianIndex < BaseIndex
   ## so we must ensure they're reasonably valid. this typically only affect
   ## spam.
   MIN_DATE = Time.at 0
-  MAX_DATE = Time.at(2**31)
+  MAX_DATE = Time.at(2**31-1)
 
   def initialize dir=BASE_DIR
     super
-- 
1.6.0.4

---

From: [email-masked] (Rich Lane)
Date: Mon, 27 Jul 2009 20:19:30 -0700

---
 lib/sup/ferret_index.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/ferret_index.rb b/lib/sup/ferret_index.rb
index f2bb2a0..5473814 100644
--- a/lib/sup/ferret_index.rb
+++ b/lib/sup/ferret_index.rb
@@ -442,6 +442,7 @@ private
 
   def build_ferret_query query
     q = Ferret::Search::BooleanQuery.new
+    q.add_query Ferret::Search::MatchAllQuery.new, :must
     q.add_query query[:qobj], :must if query[:qobj]
     labels = ([query[:label]] + (query[:labels] || [])).compact
     labels.each { |t| q.add_query Ferret::Search::TermQuery.new("label", t.to_s), :must }
-- 
1.6.0.4