3 ms·
Using some database backed full text search will beat this by a huge margin. Especially when it comes to actually working correctly. As the author states wher
by LordHeini 8y ago
Using some database backed full text search will beat this by a huge margin.
Especially when it comes to actually working correctly.
As the author states where are some caveats with invalid "hashes" and i managed to get false negatives on the third try.
For example 'Baden-Württemberg' and 'Egypt' is in the file but not found by the search.
Not to mention fuzzy search which is highly important if you are doing any kind of text search.
And setting up some PostgresSQL or SQLite costs nothing compared to the cost of debugging this rather naive approach.
- peterburkimsher 8y agoSome queries (e.g. San Francisco) work on localhost but not Github, apparently because of case-insensitive URLs. That's probably what's up with Egypt and B-W. A better hashing/binning algorithm should fix that. I don't think this can compete with a database for features. It's more a proof of concept for using the filesystem as a search index, which might have some other applications when server-side isn't available (e.g. IPFS).