fosskers / aura

A multilingual package manager for Arch Linux and the AUR.
https://fosskers.github.io/aura/
GNU General Public License v3.0
1.74k stars 114 forks source link

AUR package search still inferior to the original #923

Open RubenKelevra opened 1 month ago

RubenKelevra commented 1 month ago

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 :)

fosskers commented 1 month ago

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

RubenKelevra commented 3 weeks ago

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 commented 3 weeks ago

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
fosskers commented 3 weeks ago

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

RubenKelevra commented 3 weeks ago

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

fosskers commented 3 weeks ago

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

TheMatten commented 5 days ago

+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.

RubenKelevra commented 5 days ago

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.

fosskers commented 5 days ago

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

RubenKelevra commented 4 days ago

@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.

fosskers commented 3 days ago

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