From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 28EDC2018E for ; Tue, 16 Aug 2016 08:49:31 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] search: drop pointless range processors for Unix timestamp Date: Tue, 16 Aug 2016 08:49:25 +0000 Message-Id: <20160816084926.29394-2-e@80x24.org> In-Reply-To: <20160816084926.29394-1-e@80x24.org> References: <20160816084926.29394-1-e@80x24.org> List-Id: The Unix timestamp isn't meaningful for users searching, we will start indexing the YYYYMMDD date stamp which may use StringValueRangeProcessor, instead. --- lib/PublicInbox/Search.pm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 1398ea4..61f0338 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -179,8 +179,6 @@ sub qp { $qp->set_database($self->{xdb}); $qp->set_stemmer($self->stemmer); $qp->set_stemming_strategy(STEM_SOME); - $qp->add_valuerangeprocessor($self->ts_range_processor); - $qp->add_valuerangeprocessor($self->date_range_processor); while (my ($name, $prefix) = each %bool_pfx_external) { $qp->add_boolean_prefix($name, $prefix); @@ -205,14 +203,6 @@ sub qp { $self->{query_parser} = $qp; } -sub ts_range_processor { - $_[0]->{tsrp} ||= Search::Xapian::NumberValueRangeProcessor->new(TS); -} - -sub date_range_processor { - $_[0]->{drp} ||= Search::Xapian::DateValueRangeProcessor->new(TS); -} - sub num_range_processor { $_[0]->{nrp} ||= Search::Xapian::NumberValueRangeProcessor->new(NUM); } -- EW