mirror of
https://github.com/Jguer/yay.git
synced 2025-12-27 10:01:53 -05:00
feat(search): Add fuzzy name matching and mixed sources (#1719)
* fix(alpm): fix callback text * feat(yay): Add mixed search result * remove old result structs * add option for controlling query builder * only set query builder after parsing args * add parser args * update manpage * write test for results * write test for results * mixed source test * only sort 1 time with every mode
This commit is contained in:
9
query.go
9
query.go
@@ -19,9 +19,9 @@ import (
|
||||
)
|
||||
|
||||
// SyncSearch presents a query to the local repos and to the AUR.
|
||||
func syncSearch(ctx context.Context, pkgS []string, aurClient *aur.Client, dbExecutor db.Executor, verbose bool) error {
|
||||
queryBuilder := query.NewSourceQueryBuilder(config.SortBy, config.Runtime.Mode, config.SearchBy, config.BottomUp, config.SingleLineResults)
|
||||
|
||||
func syncSearch(ctx context.Context, pkgS []string, aurClient *aur.Client,
|
||||
dbExecutor db.Executor, queryBuilder query.Builder, verbose bool,
|
||||
) error {
|
||||
queryBuilder.Execute(ctx, dbExecutor, aurClient, pkgS)
|
||||
|
||||
searchMode := query.Minimal
|
||||
@@ -209,7 +209,8 @@ func statistics(dbExecutor db.Executor) (res struct {
|
||||
TotalSize int64
|
||||
pacmanCaches map[string]int64
|
||||
yayCache int64
|
||||
}) {
|
||||
},
|
||||
) {
|
||||
for _, pkg := range dbExecutor.LocalPackages() {
|
||||
res.TotalSize += pkg.ISize()
|
||||
res.Totaln++
|
||||
|
||||
Reference in New Issue
Block a user