aura icon indicating copy to clipboard operation
aura copied to clipboard

AUR package search still inferior to the original

Open RubenKelevra opened this issue 1 year ago • 11 comments

I've seen that Aura did big steps in proving the AUR search, but I did one today where the result is odd to me (as user). I understand, why there are differences as a programmer. However it makes usability pretty hard if the search is bad:

$ aura -As nexus mods

$ paru -Ss nexus mods
aur/dmodman-git r306.54a0274-1 [+0 ~0.00]
    TUI downloader & update checker for Nexusmods.com
aur/nexusmods-app-bin 0.5.3-2 [+2 ~1.17]
    A mod installer, creator and manager for all your popular games.

Hope this can be improved somehow without much effort :)

RubenKelevra avatar Aug 27 '24 14:08 RubenKelevra

As mentioned in the guide, at the moment only full terms can be matched on.

fosskers avatar Aug 27 '24 20:08 fosskers

Wondering if nexus and mods may be keywords?

Is it possible to read the keywords for packages via the API? Because as regular users you don't see them. Only as maintainer you got a field to fill them out.

RubenKelevra avatar Sep 02 '24 16:09 RubenKelevra

I guess not. They really do substring matching. Weird.

$ paru -Ss nexu mo
aur/nexusmods-app-bin 0.5.3-2 [+3 ~2.10] [Installed]
    A mod installer, creator and manager for all your popular games.
aur/dmodman-git r306.54a0274-1 [+0 ~0.00]
    TUI downloader & update checker for Nexusmods.com

RubenKelevra avatar Sep 02 '24 20:09 RubenKelevra

It's probably just calling the AUR directly, which does substring matching internally.

fosskers avatar Sep 02 '24 21:09 fosskers

Yeah, I was just wondering. That's not a very performant operation, weird that they do this on the AUR database :)

RubenKelevra avatar Sep 03 '24 10:09 RubenKelevra

Some databases do support such full-text search, but running a database was something I wanted to avoid.

fosskers avatar Sep 04 '24 22:09 fosskers

+1 for this being very impractical - if user doesn't know exact name of the package, it's easy to miss some characters, e.g. in shortcuts or singular vs. plural.

TheMatten avatar Sep 21 '24 15:09 TheMatten

Some databases do support such full-text search, but running a database was something I wanted to avoid.

How about not running a database and instead have aura download the database and run the search locally?

Would be much faster, available offline, no additional server cost and you could provide simple update files, say compressed sql files with the delta, so aura could catch up and don't have to re-download the whole database on each update.

If you don't want to add something like sqlite, there's probably plenty of in memory databases available for rust. So you would simply provide a list with the AUR metadata and load it in the in-memory database on a query, before searching it.

zstd can create the tiny delta updates for the file with its --patch-from= feature.

So you would just offer some tiny static files to download, probably packing them from time to time into tar files for quicker downloads.

RubenKelevra avatar Sep 21 '24 22:09 RubenKelevra

Interesting idea but the size would be prohibitive, especially to keep updated for all users.

fosskers avatar Sep 22 '24 01:09 fosskers

@fosskers You're sure? There's only 87984 packages in the AUR. So one sentence, a couple of keywords, a version number and a name as list wouldn't weight more than ten megabytes (3 MBytes compressed) I would have guessed.

RubenKelevra avatar Sep 22 '24 02:09 RubenKelevra

You'd be surprised. Keeping it updated for everyone wouldn't be worth it the complexity.

fosskers avatar Sep 23 '24 08:09 fosskers