I just discovered the open source Stract search engine, which looks great (GitHub, homepage, HN discussion). It has a feature it calls “Optics” that are very similar to Kagi Lenses, except more powerful because they use a programmable configuration language to define the rule lists, and because they can handle many more rules than Kagi's limit of 10 domains per filter. Stract comes with some interesting built-in Optics:
- Copycats removal: Remove common copycat websites from search results.
- Hacker News: Only return results from websites that are popular on Hacker News.
- Discussions: Only return results from forums or similar types of QA pages.
- Fediverse: Only search in fediverse sites.
- Indieweb & blogroll: Search only in the indieweb + a list of blogs from blogroll.org and some hand-picked blogs from hackernews.
- 10K Short: Remove the top 10,000 most popular websites from search results.
- Devdocs: Only return results from some of the developer documentation sites listed on devdocs.io. This is a non-exhaustive list.
- Academic: Search exclusively in academic sites (.edu, .ac.uk, arxiv.org etc.). This is a non-exhaustive list.
- Tilde: Only search in urls that contain a tilde (~).
Kagi already has filters similar to some of these, but the others would fit perfectly with Kagi’s ethos.
So, this feature request is:
- Allow configuring Kagi lenses using a programmable configuration language.
- Allow supporting more than 10 domains per lens.
- Add more default lenses.
Edit: a better title for this issue would be: “Use a programmable configuration language for lenses, similar to Stract’s Optics.”