Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve relevance sorting by calculating LCS for package names #118

Merged
merged 2 commits into from
Mar 28, 2016
Merged

Improve relevance sorting by calculating LCS for package names #118

merged 2 commits into from
Mar 28, 2016

Conversation

f2404
Copy link
Collaborator

@f2404 f2404 commented Mar 22, 2016

This attempts to resolve #117 by calculating LCS between the target and the result name in case when the packages are searched by both names and descriptions (this is not needed when searching by names only).

The output may still be improved - "yaourt-gui-manjaro" could be on a higher position since it contains full target string. This is a subject for further research.

$ ./src/package-query -As yaourt --sort r
aur/yaourt 1.8.1-1 (2850) (55.06)
    A pacman wrapper with extended features and AUR support
aur/yaourt-git 1.8.1.r11.g153c1f3-1 [installed] (182) (5.93)
    A pacman wrapper with extended features and AUR support
aur/yaourt-gui 1.5-2 (201) (5.73)
    A bash GUI for yaourt
aur/aurtab 1-2 (12) (1.52)
    AUR tab completion for yaourt and apacman using zsh.
aur/safeaur 1.1.2-1 (2) (1.06)
    safeaur is auto Backup and re-store System for yaourt.
aur/yaourt-gui-manjaro 1.4.5-2 (16) (0.69)
    A bash GUI for yaourt (Manjaro theming) and Romanian translation added
aur/pacmind 2.5-4 (54) (1.07)
    A gtkdialog frontend gui for the package manager, inspired to yaourt-gui
aur/lightspark-local 20120810-1 (0) (0.00)
    My modified version of the lightspark-git PKGBUILD; Enhancements: choose between devel and normal buildtype, save 
    changes local even if you use yaourt
aur/pacmanxg 4.17.0-1 (7) (0.87)
    Yet another GUI for pacman and yaourt. Depends on neither GTK or Qt: only X11
aur/pac_manage 1.4-1 (0) (0.00)
    pacman/yaourt helper - manage packages in a single file

@f2404 f2404 merged commit 00554e8 into archlinuxfr:master Mar 28, 2016
@f2404 f2404 deleted the 117_improve_rel_sort branch March 28, 2016 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve sorting results by relevance
1 participant