From: rlane@club.cc.cmu.edu (Rich Lane)
Subject: [sup-talk] [PATCH 2/2] xapian: fix issue with empty ferret query
Date: Mon, 27 Jul 2009 20:19:30 -0700 [thread overview]
Message-ID: <1248751170-4102-2-git-send-email-rlane@club.cc.cmu.edu> (raw)
In-Reply-To: <1248751170-4102-1-git-send-email-rlane@club.cc.cmu.edu>
---
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
prev parent reply other threads:[~2009-07-28 3:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 3:19 [sup-talk] [PATCH 1/2] xapian: fix MAX_DATE Rich Lane
2009-07-28 3:19 ` Rich Lane [this message]
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=1248751170-4102-2-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