Hacker News new | ask | show | jobs
by emmanueloga_ 735 days ago
Hey there,

Took me really long to understand what this is... let me see if I get it right:

* You scrape rubyweekly.com into Sqlite entries.

* You provide a simple search engine on top of that.

1) Less is more, you can simply state that on your page ("Search an index of scraped rubyweekly articles).

2) If I get it right you are doing regex match for keywords, but maybe you could rely on FTS5 since you are using Sqlite, you may be able to get better results faster, maybe with less code? ([1] random article I found about rails+FTS5).

Cheers!

--

1: https://mariochavez.io/desarrollo/2023/09/01/full-text-searc...

1 comments

P.S. it just occurred to me that if the aggregated links are less than 1mb of data or something like that you could try to bundle all data in a single JSON object and search in the frontend with a library like flexsearch [1]. That could be even less work than running a minimal rails backend.

--

1: https://github.com/nextapps-de/flexsearch

They don't even need to output to JSON - https://phiresky.github.io/blog/2021/hosting-sqlite-database...

The entire thing could be a static site using the above method -- even if it's many hundreds of megabytes in size!