GNU bug report logs - #65809
mumi: Add context in search results when querying for (subject:<something>)

Previous Next

Package: mumi;

Reported by: Giovanni Biscuolo <g <at> xelera.eu>

Date: Thu, 7 Sep 2023 16:54:02 UTC

Owned by: Arun Isaac <arunisaac <at> systemreboot.net>

Severity: wishlist

To reply to this bug, email your comments to 65809 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#65809; Package guix. (Thu, 07 Sep 2023 16:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Giovanni Biscuolo <g <at> xelera.eu>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 07 Sep 2023 16:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: bug-guix <at> gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [mumi] [wishlist] Allow searching subject prefix
Date: Thu, 07 Sep 2023 18:52:34 +0200
[Message part 1 (text/plain, inline)]
Hello,

IMO is useful to be able to search for "subject:foo", it's a different
search than searching for foo in the body

in file mumi/xapian.scm I read:

--8<---------------cut here---------------start------------->8---

             ;; Index subject and body without prefixes for general
             ;; search.
             (index-text! term-generator subjects)
             (increase-termpos! term-generator)
             (index-text! term-generator text)

--8<---------------cut here---------------end--------------->8---

Is it possible to add such a feature please?

Thanks! Gio'


P.S.: I did not Cc: Ricardo Wurmus since AFAIU he prefers not to
continue developing this

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#65809; Package guix. (Sun, 10 Sep 2023 04:49:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Giovanni Biscuolo <g <at> xelera.eu>, bug-guix <at> gnu.org
Subject: Re: [mumi] [wishlist] Allow searching subject prefix
Date: Sun, 10 Sep 2023 05:47:41 +0100
Hi Gio,

Thanks for this feature request! It's always gratifying to know that
someone is using mumi, especially its more advanced features! :-)

> IMO is useful to be able to search for "subject:foo", it's a different
> search than searching for foo in the body

It looks like we implement this already. See
https://git.savannah.gnu.org/cgit/guix/mumi.git/tree/mumi/xapian.scm#n141
A search for "subject:foo" should work already.

Cheers!
Arun




Information forwarded to arunisaac <at> systemreboot.net, bug-guix <at> gnu.org:
bug#65809; Package guix. (Sun, 10 Sep 2023 14:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 65809 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: 65809 <at> debbugs.gnu.org
Subject: mumi: Add msg number and subject in search results when searching
 for subject:
Date: Sun, 10 Sep 2023 16:16:41 +0200
[Message part 1 (text/plain, inline)]
Hi!

(I'll also try to retitle this bug, after submitting this update)

Arun Isaac <arunisaac <at> systemreboot.net> writes:

> Thanks for this feature request! It's always gratifying to know that
> someone is using mumi, especially its more advanced features! :-)

mumi advanced features could be **very** useful to a lot of contributing
activities, if improved a little bit and better understood

>> IMO is useful to be able to search for "subject:foo", it's a different
>> search than searching for foo in the body
>
> It looks like we implement this already. See
> https://git.savannah.gnu.org/cgit/guix/mumi.git/tree/mumi/xapian.scm#n141
> A search for "subject:foo" should work already.

Uh I missed that code:

--8<---------------cut here---------------start------------->8---

             (index-text! term-generator subjects #:prefix "S")

--8<---------------cut here---------------end--------------->8---

otherwise I could have realize that I was misinterpreting mumi search
output.

If for example I search for 'subject:zoneinfo' I get this results:

--8<---------------cut here---------------start------------->8---

giovanni <at> roquette [genv]\: mumi search subject:zoneinfo
#31484 [PATCH] gnu: icu4c: Patch zoneinfo directory.
opened on 17 mag 2018 14:58 by Christopher Baines
#57448 ✓ [PATCH 0/5] gnu: exa: Update to 0.10.1.
opened on 27 ago 2022 12:09 by ギャラ
#58614 ✓ [PATCH 000/187] Remove unused crates
opened on 18 ott 2022 22:18 by Efraim Flashner

--8<---------------cut here---------------end--------------->8---
(the mumi CLI output is colored and the separation of each bug is
clearer)

Via web: https://issues.guix.gnu.org/search?query=subject%3Azoneinfo

Since 2 of the 3 patch "titles" are missing 'zoneinfo', I thought the
search was done in the subject and in the body, not just the subject.

For example, bug #58614 actually contains a message with this subject:
[PATCH 185/187] gnu: Remove rust-zoneinfo-compiled-0.4.

...my misunderstanding was due to the fact that each tracked bug (issue)
have a /Title/ given by the subject mail header from the original report
or by a retitle [1]; thus Title _is_ different from the "Subject"s of
the rest of the messages in the /thread/ of the tracked bug; when we
consider bugs tracking patches, actually each and every single patch
submission (not the reviews sent by people using a reply-to) do have a
different subject.

When searching for "subject:" it would be useful to have a speficic
message number and subject along with (or in place of) the bug title.

Using the search example above, a more useful result would be:

--8<---------------cut here---------------start------------->8---

giovanni <at> roquette [genv]\: mumi search subject:zoneinfo
#31484 [PATCH] gnu: icu4c: Patch zoneinfo directory.
opened on 17 mag 2018 14:58 by Christopher Baines

#57448 ✓ [PATCH 0/5] gnu: exa: Update to 0.10.1.
opened on 27 ago 2022 12:09 by ギャラ
[PATCH 4/5] gnu: rust-zoneinfo-compiled: Update to 0.5.1.
sent on 27 Aug 2022 12:10 by gyara

#58614 ✓ [PATCH 000/187] Remove unused crates
opened on 18 ott 2022 22:18 by Efraim Flashner
[PATCH 185/187] gnu: Remove rust-zoneinfo-compiled-0.4.
sent on 18 Oct 2022 22:20 by Efraim Flashner

--8<---------------cut here---------------end--------------->8---

I'd also add a blank line to have clear results also with "BW" consoles.

A similar addition would also be useful in the web interface, also
having a link to the message corresponding to the searched subject,
like:

[PATCH 185/187] gnu: Remove rust-zoneinfo-compiled-0.4. -> https://issues.guix.gnu.org/58614#184

Is it doable?

WDYT?

Thanks! Gio'


[1] https://debbugs.gnu.org/server-control.html

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Changed bug title to 'mumi: Add msg number and subject in search results when searching for subject:' from '[mumi] [wishlist] Allow searching subject prefix' Request was from Giovanni Biscuolo <g <at> xelera.eu> to control <at> debbugs.gnu.org. (Sun, 10 Sep 2023 14:24:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#65809; Package guix. (Sun, 17 Sep 2023 10:49:02 GMT) Full text and rfc822 format available.

Message #16 received at 65809 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Giovanni Biscuolo <g <at> xelera.eu>, 65809 <at> debbugs.gnu.org
Subject: Re: bug#65809: mumi: Add msg number and subject in search results
 when searching for subject:
Date: Sun, 17 Sep 2023 11:48:16 +0100
Hi Gio,

Sorry for my late reply. I have been travelling the last week and am
just catching up on all my email.

> When searching for "subject:" it would be useful to have a speficic
> message number and subject along with (or in place of) the bug title.

This is actually difficult to do because of the way we index issues as
Xapian "documents".

First, a quick Xapian primer. Xapian has a bunch of documents each
associated with a set of terms. When a search query comes in, Xapian
decomposes the query into a list of terms and retrieves documents that
match those terms.

In our case, we index entire issues as Xapian documents; we don't index
each individual email message as its own Xapian document. This means
that an issue is the smallest unit we can address. We cannot address
each individual email message. So, localizing a subject to a specific
email message is difficult.

Maybe what you are looking for is some context in the search results to
know why that particular search result was produced. This can be done by
displaying a snippet of text from the issue with the search terms
highlighted. For a working demo of what I mean, see for example,
https://issues.genenetwork.org/search?query=database&type=all . Notice
how the search term "database" is highlighted in the search
results. This is relatively easy to do with Xapian, and indeed I do plan
to implement this at some point.

WDYT? Would this meet your needs?

Regards,
Arun




Information forwarded to bug-guix <at> gnu.org:
bug#65809; Package guix. (Mon, 18 Sep 2023 15:38:02 GMT) Full text and rfc822 format available.

Message #19 received at 65809 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: Arun Isaac <arunisaac <at> systemreboot.net>, 65809 <at> debbugs.gnu.org
Subject: Re: bug#65809: mumi: Add msg number and subject in search results
 when searching for subject:
Date: Mon, 18 Sep 2023 17:36:43 +0200
[Message part 1 (text/plain, inline)]
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> writes:

> Sorry for my late reply.

No problem: async! :-D 

[...]

> In our case, we index entire issues as Xapian documents; we don't index
> each individual email message as its own Xapian document.

Ooh, I understand now!

> This means that an issue is the smallest unit we can address. We
> cannot address each individual email message. So, localizing a subject
> to a specific email message is difficult.

Yes, I see.

> Maybe what you are looking for is some context in the search results to
> know why that particular search result was produced. This can be done by
> displaying a snippet of text from the issue with the search terms
> highlighted. For a working demo of what I mean, see for example,
> https://issues.genenetwork.org/search?query=database&type=all .

Oooh: a live example is more than a thousand words: thanks!
(I'm following Tissue but someway I missed that feature)

> Notice how the search term "database" is highlighted in the search
> results. This is relatively easy to do with Xapian, and indeed I do
> plan to implement this at some point.

OK: can we consider this bug report (wishlist) as the "official" one for
that feature? :-)

Can I retitle it to better reflect the upcoming implementation and
assign it to you?

Actually I dont' know if there is some written or unwritten convention
in Guix or GNU about bug assignment, I don't want to put pressure on
you!

> WDYT? Would this meet your needs?

Yes, absolutely yes: thank you!

Happy hacking! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Changed bug title to 'mumi: Add context in search results when querying for (subject:<something>)' from 'mumi: Add msg number and subject in search results when searching for subject:' Request was from Giovanni Biscuolo <g <at> xelera.eu> to control <at> debbugs.gnu.org. (Mon, 18 Sep 2023 15:43:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#65809; Package guix. (Mon, 18 Sep 2023 19:58:02 GMT) Full text and rfc822 format available.

Message #24 received at 65809 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Giovanni Biscuolo <g <at> xelera.eu>, 65809 <at> debbugs.gnu.org
Subject: Re: bug#65809: mumi: Add msg number and subject in search results
 when searching for subject:
Date: Mon, 18 Sep 2023 20:56:57 +0100
>> Notice how the search term "database" is highlighted in the search
>> results. This is relatively easy to do with Xapian, and indeed I do
>> plan to implement this at some point.
>
> OK: can we consider this bug report (wishlist) as the "official" one for
> that feature? :-)

Sure!

> Can I retitle it to better reflect the upcoming implementation and
> assign it to you?

Yes, please!

> Actually I dont' know if there is some written or unwritten convention
> in Guix or GNU about bug assignment, I don't want to put pressure on
> you!

No problem! I do intend to implement this feature at some point
anyway. Even if I don't do it, it's good to list this as an issue so
that someone interested can try and hack on it.




Owner recorded as Arun Isaac <arunisaac <at> systemreboot.net>. Request was from Giovanni Biscuolo <g <at> xelera.eu> to control <at> debbugs.gnu.org. (Tue, 19 Sep 2023 06:39:01 GMT) Full text and rfc822 format available.

bug reassigned from package 'guix' to 'mumi'. Request was from Felix Lechner <felix.lechner <at> lease-up.com> to control <at> debbugs.gnu.org. (Thu, 08 Feb 2024 18:11:01 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.