This is really cool. I have a pretty fast BM25 search engine in Pandas I've been working on for local testing. https://github.com/softwaredoug/searcharray Why Pandas? Because BM25 is one thing, but you also want to combine with other factors (recency, popularity, etc) easily computed in pandas / numpy... BTW phrases are the hard thing. There are a lot of edge case in phrase matching. Not to mention slop, etc. And you…
Thanks for your comment Doug! I just bought your book (Relevance Search) and I'm planning to read it asap. I'll give a look to your project and try it for experimenting, thanks for sharing.
A search engine in 80 lines of Python
31–40 of 100 posts
Re: A search engine in 80 lines of Python
#32Re: A search engine in 80 lines of Python
#33i know it is unrelated but i liked your website.
Re: A search engine in 80 lines of Python
#34But, let's talk scale and features. As it stands, handling bigger data sets or adding more complex search features might be tough. On the features side, playing around with query operators or n-gram indexing could seriously level up your search results.
Expanding beyond RSS for content could also give your engine a nice touch. Just throwing in my thoughts – been around the block with search tech a bit. Can't wait to see what's next for your project!
Re: A search engine in 80 lines of Python
#35Re: A search engine in 80 lines of Python
#36Earlier quoted context omitted.
Why not celebrate the achievements of the industry allowing us to build something like this in 80 LOC?
I mean, I could import this achievement in my own project and build a search engine in 1 LOC.
Re: A search engine in 80 lines of Python
#37What is the point of flexing about LOC, if it is not a total number of \r\n since we are using external deps? I know that there is no unit for codebase in SI system, but I think we should measure cognitive load somehow.
Although it's not formal, my team sometimes says "this code is not grug" or "this code is pretty grug" in reference to https://grugbrain.dev
Re: A search engine in 80 lines of Python
#38Earlier quoted context omitted.
It's not the first time I saw an article posted and then an expert in the field comment on it rather quickly, I thought I may be missing something how other people use this site, had no negative intentions asking this and thanks for the answer ;)
HN has an RSS feed [0] so there's no need to keep refreshing or make the rounds of this and other sites that have interesting information. I have my own feed setup with sites I like to frequent [1]. [0] https://hackaday.com/blog/feed/ [1] https://mechaelephant.com/feed
Re: A search engine in 80 lines of Python
#39Earlier quoted context omitted.
Why not celebrate the achievements of the industry allowing us to build something like this in 80 LOC?
I mean, I could import this achievement in my own project and build a search engine in 1 LOC.
You can see how your 1-liner pitch doesn't fulfill this expectation.
Re: A search engine in 80 lines of Python
#40I needed something like this once, but at a little bit larger scale (few tens of thousands of documents). The answer, as always, was [sqlite](https://www.sqlite.org/fts5.html); structurally though it's just what you have here but with someone else writing the inverted-index persistence layer.