unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: David Wei <dw@davidwei.uk>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: lei - dfn filters for net/* catching drivers/net/*
Date: Fri, 3 Nov 2023 11:29:58 -0700	[thread overview]
Message-ID: <c0f25f26-9baa-4e64-aa9d-8502a7e349ca@davidwei.uk> (raw)
In-Reply-To: <20231102212722.M583684@dcvr>

On 2023-11-02 14:27, Eric Wong wrote:
> David Wei <dw@davidwei.uk> wrote:
>> Hi,
>>
>> I have a problem with lei dfn filters. Here is my query:
>>
>> lei q -o ~/Mail/overlay -I https://lore.kernel.org/all -t '(dfn:net/* OR dfn:drivers/net/ethernet/mellanox/mlx5/* OR dfn:drivers/net/ethernet/broadcom/bnxt/*) AND tc:netdev@vger.kernel.org AND rt:2.week.ago..'
>>
>> I'm seeing patches that touch drivers/net/* whereas I only want to match
>> net/*.
>>
>> I tried changing it to dfn:^net/* and dfn:b/net/* but neither is
>> working,
> 
> Right, ^ is a regexp thing and I don't think Xapian supports anything
> like it.
> 
>> I also read the Xapian docs: https://xapian.org/docs/queryparser.html
>> but didn't see anything more than * wildcards.
>>
>> Could you please advise on how I can limit my query to only net/*?
> 
> I'm not an expert in Xapian's parser, either, but I think `AND NOT'
> is appropriate here.  So something like:
> 
> 	dfn:net/* AND NOT dfn:drivers/net/*
> 
> Would be helpful to know if it works for you.
> (having NOT only is very expensive and not allowed via the web interface,
> but combining it a positive match should be fine)

Thank you, using AND NOT does work. However, there are many more file
paths that partially match "net/", and excluding each one by one using
AND NOT is tedious.

I found that using b:b/net/* works very well to match patch diffs in
message bodies. This achieves my intended goal of matching only ^net/*.

      reply	other threads:[~2023-11-03 18:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 21:16 lei - dfn filters for net/* catching drivers/net/* David Wei
2023-11-02 21:27 ` Eric Wong
2023-11-03 18:29   ` David Wei [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

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0f25f26-9baa-4e64-aa9d-8502a7e349ca@davidwei.uk \
    --to=dw@davidwei.uk \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).