samhaswon / bible_search

A Python package for searching multiple versions of the Bible
GNU General Public License v3.0
2 stars 1 forks source link

This is cool! #1

Closed pastorhudson closed 7 months ago

pastorhudson commented 8 months ago

Hey this looks awesome I'll probably add this to my keybase bot.

samhaswon commented 8 months ago

Awesome! Hope it helps! However, I'll warn you, that loading the full index is a bit slow right now. I might move it to GitHub LFS in the future, but this is the best way I can think of for now to distribute the index.

pastorhudson commented 8 months ago

It's just slow the first time we pip install right?

samhaswon commented 8 months ago

The pip install should be fairly quick since the whole index is currently a little over 20 MB. It's the loading of the index that takes a few seconds depending on the hardware it is running on. From there, each query averages below 1 ms on my machine. It's a consequence of using a reverse index for the search.

I chose a reverse index in part for its search speed, but also because of version support. The index only contains the references and not the passages themselves, so I can support more versions. You win some and you lose some, I guess.