* [sup-talk] [PATCH 1/2] xapian: fix MAX_DATE
@ 2009-07-28 3:19 Rich Lane
2009-07-28 3:19 ` [sup-talk] [PATCH 2/2] xapian: fix issue with empty ferret query Rich Lane
0 siblings, 1 reply; 2+ messages in thread
From: Rich Lane @ 2009-07-28 3:19 UTC (permalink / raw)
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [sup-talk] [PATCH 2/2] xapian: fix issue with empty ferret query
2009-07-28 3:19 [sup-talk] [PATCH 1/2] xapian: fix MAX_DATE Rich Lane
@ 2009-07-28 3:19 ` Rich Lane
0 siblings, 0 replies; 2+ messages in thread
From: Rich Lane @ 2009-07-28 3:19 UTC (permalink / raw)
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-28 3:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-28 3:19 [sup-talk] [PATCH 1/2] xapian: fix MAX_DATE Rich Lane
2009-07-28 3:19 ` [sup-talk] [PATCH 2/2] xapian: fix issue with empty ferret query Rich Lane
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox