about summary refs log tree commit homepage
path: root/lib/PublicInbox/Search.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-03-26 06:29:37 +0200
committerEric Wong <e@80x24.org>2021-03-26 19:59:34 +0000
commit43c43f785aa53607a0dd050989da5d7fd0dcfff4 (patch)
treef9fd037a837f4e38c654d7bb450f22b9473147dc /lib/PublicInbox/Search.pm
parent37dfb2c0d3c60277567325c15d5695b2dee03ad1 (diff)
downloadpublic-inbox-43c43f785aa53607a0dd050989da5d7fd0dcfff4.tar.gz
"lei q" now displays labels in JSON output, "lei mark"
can add or remove labels for any messages.

"lei ls-label" is supported, too.

Unfortunately, "lei q" won't hande "kw:" or "L:" for
external messages, they must be imported, first.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r--lib/PublicInbox/Search.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index c7d52daf..ab04d430 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -370,7 +370,7 @@ sub query_approxidate {
 sub mset {
         my ($self, $query_string, $opts) = @_;
         $opts ||= {};
-        my $qp = $self->{qp} //= qparse_new($self);
+        my $qp = $self->{qp} //= $self->qparse_new;
         my $query = $qp->parse_query($query_string, $self->{qp_flags});
         _do_enquire($self, $query, $opts);
 }
@@ -463,7 +463,7 @@ sub mset_to_smsg {
 sub stemmer { $X{Stem}->new($LANG) }
 
 # read-only
-sub qparse_new ($) {
+sub qparse_new {
         my ($self) = @_;
 
         my $xdb = xdb($self);
@@ -516,7 +516,7 @@ EOF
 
 sub help {
         my ($self) = @_;
-        $self->{qp} //= qparse_new($self); # parse altids
+        $self->{qp} //= $self->qparse_new; # parse altids
         my @ret = @HELP;
         if (my $user_pfx = $self->{-user_pfx}) {
                 push @ret, @$user_pfx;