From 746323cbde3f5da5d66efe742b30894b0d806ffe Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 22 Aug 2015 11:41:22 +0000 Subject: search: consistently pass options and flags Most of our special query functions require exact matches, so none of the flags we normally use are necessary for query parsing. --- lib/PublicInbox/Search.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/PublicInbox/Search.pm') diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 753f5f3f..c61d4cf6 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -82,7 +82,7 @@ sub query { sub get_subject_path { my ($self, $path, $opts) = @_; my $query = $self->qp->parse_query("path:".mid_compressed($path), 0); - $self->do_enquire($query); + $self->do_enquire($query, $opts); } # given a message ID, get followups to a message @@ -94,8 +94,7 @@ sub get_followups { my $irt = $qp->parse_query("inreplyto:$mid", 0); my $ref = $qp->parse_query("references:$mid", 0); my $query = Search::Xapian::Query->new(OP_OR, $irt, $ref); - - $self->do_enquire($query); + $self->do_enquire($query, $opts); } sub get_thread { @@ -104,8 +103,8 @@ sub get_thread { return { total => 0, msgs => [] } unless $smsg; my $qp = $self->qp; - my $qtid = $qp->parse_query('thread:'.$smsg->thread_id); - my $qsub = $qp->parse_query('path:'.mid_compressed($smsg->path)); + my $qtid = $qp->parse_query('thread:'.$smsg->thread_id, 0); + my $qsub = $qp->parse_query('path:'.mid_compressed($smsg->path), 0); my $query = Search::Xapian::Query->new(OP_OR, $qtid, $qsub); $self->do_enquire($query, $opts); } -- cgit v1.2.3-24-ge0c7