unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* lei - dfn filters for net/* catching drivers/net/*
@ 2023-11-02 21:16 David Wei
  2023-11-02 21:27 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: David Wei @ 2023-11-02 21:16 UTC (permalink / raw)
  To: meta

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,

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/*?

Thanks!
David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lei - dfn filters for net/* catching drivers/net/*
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2023-11-02 21:27 UTC (permalink / raw)
  To: David Wei; +Cc: meta

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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: lei - dfn filters for net/* catching drivers/net/*
  2023-11-02 21:27 ` Eric Wong
@ 2023-11-03 18:29   ` David Wei
  0 siblings, 0 replies; 3+ messages in thread
From: David Wei @ 2023-11-03 18:29 UTC (permalink / raw)
  To: Eric Wong; +Cc: meta

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/*.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-03 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).