News for hackers. Stuff that matters.
Re:Building a full-text search engine in 150 lines of Python... by creamytaco on Thursday March 25, 2021 @03:17PM (#26584234)
Why would one choose Python for this instead of Go or Rust?

I imagine Python performance would be terrible.

Re:Building a full-text search engine in 150 lines of Python... by bartdegoede on Thursday March 25, 2021 @03:19PM (#26584260)
The idea was to illustrate the concepts of an inverted index and tf-idf :-) I've built some stuff like this for a smaller project written in Python because it was Easier™ than spinning up an Elasticsearch cluster (ie it definitely didn't need to scale :-D)
Re:Building a full-text search engine in 150 lines of Python... by sodapopcan on Thursday March 25, 2021 @04:06PM (#26584746)
Yes, I've been really interested in FTS recently and love articles like this. I'm currently implementing a paired-down version myself in Elixir because I'm searching one "table" (not postgres) and I don't want to bring in external dependencies for it.
Re:Building a full-text search engine in 150 lines of Python... by theplague42 on Thursday March 25, 2021 @03:19PM (#26584259)
Because it's easier for the average developer to follow Python code? This is a tutorial/demo, not a library.
Re:Building a full-text search engine in 150 lines of Python... by Thaxll on Thursday March 25, 2021 @03:27PM (#26584360)
The article is good and so can be applied to any language, also Python is not that slow.
Re:Building a full-text search engine in 150 lines of Python... by roelschroeven on Thursday March 25, 2021 @04:25PM (#26584944)
As a lot of the work is done by code library code, there's a very good chance that the code is not all that slow.
Re:Building a full-text search engine in 150 lines of Python... by neolog on Thursday March 25, 2021 @03:23PM (#26584314)
If the dataset is small, speed doesn't matter. Also, there's PyPy if you need speed.