Commit Graph
26 Commits
Author SHA1 Message Date
github-actions[bot]andCopilot c7a6d20e62 [repo-assist] Ignore unknown Lua search-filter results (#2930)
fix(query): ignore unknown search filter results

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-31 02:57:21 +09:00
github-actions[bot]andCopilot 63f162762b [repo-assist] perf(query): normalize search terms once per query (#2928)
perf(query): normalize search terms once per query

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-31 02:55:56 +09:00
Jo 4a5a0f3d33 fix(query): improve multi-term search ranking and filtering (#2926)
- Join search terms with space instead of empty separator so Jaro-Winkler
  similarity compares against realistic strings (e.g. 'linux ck' vs 'linuxck')
- Change matchesSearch symbol check from early return to continue so non-symbol
  terms in multi-term queries are still filtered instead of being bypassed
2026-07-21 21:40:51 +00:00
github-actions[bot] 29f7ed87c4 perf(query): normalize package fields once per search (#2922)
perf(query): normalize package fields once per search
2026-07-20 10:50:41 +02:00
Jo 4869306719 feat(search): implement render-hooks for search (#2896)
* add render hooks

* re-render hook per event

* add example with single_line and simplify built rendering

* update docs availability

* remove comments
2026-07-06 14:15:57 +02:00
Jo 19cd422953 query: precompute metricScore and update deps (#2893)
* query: precompute metricScore once per result

Normalize the search term and name/provider/desc at the metric boundary, drop the per-comparison distance cache, and score each result via prepareMetrics before sorting. Adds a search-flow benchmark to track regressions.

* update deps
2026-06-27 16:47:41 +02:00
Jo 02fb6ba948 fix(search): fix clober of packages from different sources with the same name (#2882) 2026-06-19 22:39:39 +02:00
Jo 8fcaff9e6f fix(depgraph): reduce memory allocations (#2875)
* cleanup mem allocs

* lint
2026-06-18 19:58:23 +02:00
Jo 70d7a0f0a8 fix(lua): Reduce event size of PostInstall and SearchFilter hooks (#2871)
* remove fields from events that might not be needed yet

* reduce event size
2026-06-17 21:40:02 +02:00
Jo 15057c8dab misc(ci): add modernize linter and update versioning (#2870)
* add modernize linter

* lint unused

* update imports

* ignore agent info
2026-06-17 21:09:53 +02:00
Jo 3b3a2b1dcc fix: search filter hooking and multierror cleanup (#2868)
* fix search filtering pass along

* prepare inclusion 'modernize' linter and use errors.join instead
2026-06-17 19:34:33 +02:00
Jo 4dbf124c51 feat(lua): add search filter and post install hooks (#2867)
* search filter and post install

add examples

* add tag
2026-06-16 23:35:18 +02:00
Jo ac83d3fb06 Switch to JaroWinkler distance and reweight package search scores (#2840)
fix(query): use JaroWinkler distance and reweight metric components

Switch from Hamming to JaroWinkler distance for package name matching,
as JaroWinkler handles variable-length strings and gives a prefix-match
bonus better suited to package search.

Reweight the score components from sim*0.50 + simDesc*0.20 + popularity*0.30
to sim*0.35 + simDesc*0.15 + popularity*0.50 to better surface popular
packages when name similarity is moderate.

Roll back the unreleased version target from 13.0.0 to 12.6.0 to align
with the next minor release after v12.5.7.

Fix scanner.Err() check in parseStdin to surface I/O errors that were
previously silently dropped.
2026-06-07 18:16:46 +02:00
Jo 0a928ba9f4 feat(yay): use dyalpm for alpm usage (#2769)
* squash: dyalpm integration

* fix vercmp

* fix linting
2026-01-22 16:46:55 +01:00
Joey Holtzman 733e6a6b17 Add support for all sortyby options (#2747)
* Add all sortyby options

Previously, only 'name' was a supported sortby option. Now, all sortby
options are supported.

Whenever there is a tie, the metric is used as a tiebreaker (it is also
the default when sortby is not specified). The only behavior that
changed is that packages with the same metric are sorted oppositely when
sorting bottomUp. This was actually a bug in the previous implementation
which inverts the `cmpResult` for bottomUp which returns true if the
metrics are the same. According to the docs for Less
(https://pkg.go.dev/sort#Interface), Less(i, i) should be false (the
same element cannot sort before itself).

I mainly structured the code for efficiency by creating the sortby
function once rather than checking `separateSources` and `bottomUp`
every comparison, but I also think this improves readability compared to
having a switch-case in the comparison function.

* Fix separating sources on ties and improve test coverage

* Remove 'id' and 'baseid' in sortby options
2026-01-22 09:26:35 +01:00
Jo df80f397af feat(repo): Sort repository results by pacman.conf repo order (#2740)
* ci(yay): update packages on builder before building release

* respect other repos in order

* ensure repo ends on top in case of tie

* revert dockerfile change
2025-12-19 21:13:47 +01:00
Jo 81440e54a4 chore(go): modernize syntax (#2672)
* modernize go syntax

* fix lint
2025-09-18 18:05:58 +02:00
Jo b745f87210 chore(ci): update golangci lint v2.1.5 (#2615)
* chore(ci): update golangci-lint to v2.1.5 in ci.Dockerfile

* add golangci

* fix lint

* fix lint pkg/upgrade

* reenable lint
2025-05-01 10:00:10 +02:00
Jo 8916cd174b refactor(yay): move cfg inside of runtime (#2259)
* rework relationship between runtime and cfg

* separate runtime from cfg

* simplify instantiation logic

* move installer to appropriate package

* move operator to sync package

* add tests for srcinfo service

* consolidate srcinfo service in sync

* add logger to srcinfo

* add logger to preparer

* remove unused text functions

* remove remaining text.* from srcinfo

* remove global logger parts

* remove global org method exports

* remove global logger

* move text->input

* add rule to prevent fmt.Print

* update golangci go version

* remove outdated FAQs

* remove outdated FAQs
2023-08-06 21:39:41 +02:00
Jo 04c82b8112 chore(yay): replace custom set package with dep (#2249)
* replace string set with dep

* remove unused field

* remove custom string set package
2023-07-23 17:29:01 +00:00
smolx 12282fb28a Fix sorting by name in package search (#2198)
Slightly reorganize and add more tests for SourceQueryBuilder.
2023-06-03 14:01:17 +00:00
Jo 49267b9cd9 feat(upgrade): separate menu for pulled along dependencies (#2141)
try separate menu for pulled along

use installed as term

fix order gap

fix tests

add aur db + aur scenario
2023-04-27 07:20:21 +00:00
adasauce 76e5ee1fa6 fix: querybuilder GetTargets start iteration at 1, when include is 0 causes a crash (#2109) 2023-04-11 16:23:19 +00:00
Jo c63576c36d fix(search): always trust search if there's only one term (#2046)
always trust search if there's only one term
2023-04-03 07:16:03 +00:00
Jo dd42593ba1 fix(search): only do exact trim in certain modes (#2045)
only do exact trim in certain modes
2023-04-02 17:50:35 +00:00
Jo d13bdb0ce1 feat(search): improve exact match for separate source (#2044)
* unify query builder

* remove uneeded code

* reorganize code
2023-04-02 00:23:02 +00:00