From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 19AEC1F406; Sun, 12 Nov 2023 00:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1699747851; bh=fauJQtaIi9BVGU4dslXdKFe3mHKiIiNxH0KevEvk0oA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TC8ccxDo5iPvjVoitTZulzQIqujN8NBzqciByHAHSBGcXx+/KGHV4rg5gHNy1/uVx RchVLOUKf0x9o1lH4dc1Cl3whQPRDRhk5/lHNc/iaMjxRCde//HkKei+2k2xBjqspg urvzRN0uMT72rVlZUBF5Om7P12aVC9CkMBi7aVHA= Date: Sun, 12 Nov 2023 00:10:50 +0000 From: Eric Wong To: Henrik Grimler Cc: meta@public-inbox.org Subject: Re: [Bug] lei: extra quotes inserted into query with AND/OR Message-ID: <20231112001050.M917867@dcvr> References: <20231111224411.GA620644@grimlerstat.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231111224411.GA620644@grimlerstat.localdomain> List-Id: Henrik Grimler 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 :>