unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Henrik Grimler <henrik@grimler.se>
Cc: meta@public-inbox.org
Subject: Re: [Bug] lei: extra quotes inserted into query with AND/OR
Date: Sun, 12 Nov 2023 00:10:50 +0000	[thread overview]
Message-ID: <20231112001050.M917867@dcvr> (raw)
In-Reply-To: <20231111224411.GA620644@grimlerstat.localdomain>

Henrik Grimler <henrik@grimler.se> wrote:
> Hi,
> 
> I recently found out about lei and installed it through archlinux's
> package manager and am trying out queries. When using AND/OR extra
> quotes are inserted in the curl command which messes it up, for
> example:
> 
> $ lei q -I https://lore.kernel.org/all/ -o ~/mail/foo 'dfn:COPYING OR dfn:Makefile'
> # /home/grimler/.local/share/lei/store 0/0
> # /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/all/?x=m&q=dfn%3A%22COPYING+OR+dfn%3AMakefile%22
> # 0 written to /home/grimler/mail/foo/ (0 matches)
> 
> where it can be seen that it tries to search for 'dfn:"COPYING OR
> dfn:Makefile"', and no hits are returned since there is no file named
> "COPYING OR dfn:Makefile".

Don't use quotes unless you want a phrase search.

Basically, I wanted the CLI and WWW search to feel the same.

> Is this a known issue, or am I doing something wrong?

I think you're the second user to add unnecessary quotes;
is it learned behavior from another search tool?

In my experience, generic web search engines don't use quotes
outside of phrase search, either...

My primary mail experience is from using mairix, so lei borrows
heavily from it.  But IIRC, mairix doesn't support phrase search.

Anyways, thanks for the note and any future comments you provide :>

  reply	other threads:[~2023-11-12  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11 22:44 [Bug] lei: extra quotes inserted into query with AND/OR Henrik Grimler
2023-11-12  0:10 ` Eric Wong [this message]
2023-11-12  8:23   ` Henrik Grimler
2023-11-12  9:02     ` Eric Wong
2023-11-12 11:59       ` Henrik Grimler
2023-11-12 13:24         ` Eric Wong

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=20231112001050.M917867@dcvr \
    --to=e@80x24.org \
    --cc=henrik@grimler.se \
    --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).