pacseek icon indicating copy to clipboard operation
pacseek copied to clipboard

draft: regex search

Open darukutsu opened this issue 3 months ago • 0 comments

fixes #44

  • [ ] implement cache.go regex search (maybe)
  • [x] regex search (partial, see bellow)
  • [x] remove minimum search restriction (not quite good ?)
  • [ ] better result ranking (no longer dependent on 3rd party for now)

I choose RE2 standard (perl, python...), but POSIX is also easy to implement, if for some reason someone wants.

For now searching on AUR works as following:

  • from search-term are removed special characters - except .-
  • then on result we perform regex matching

I'm not aware how can I search using regex on api. I was thinking since we're using 3rd party aur pkgmanager, isn't it better to delegate term searching to it? But then not everybody implements regex. And this support is at least something. See for example https://github.com/Jguer/yay/pull/1922.

Searching on alpm is fully working as expected.

Also removed need for config options SearchMode since we can use ^ and other regex...

darukutsu avatar Sep 05 '25 15:09 darukutsu