AmenRa / retriv

A Python Search Engine for Humans 🥸
MIT License
174 stars 20 forks source link

Cache directory not in home directory? #8

Closed martiansideofthemoon closed 1 year ago

martiansideofthemoon commented 1 year ago

Dear @AmenRa, Thanks for releasing the clean retrieval library! I was wondering if it's possible to set custom cache directories? By default, it seems like the index is being stored in ~/.retriv?

Thank you!

AmenRa commented 1 year ago

Hi, and thank you for your interest in retriv. Currently, all indices created by the library are stored in the directory you mentioned. I wanted to keep everything as simple as possible for non-expert users. However, I see it can be a handful to be able to specify the saving directory. I will add an option to set it in the next few days.

martiansideofthemoon commented 1 year ago

Thanks a lot @AmenRa! I was thinking something like an environment variable would be great - by default it's set to ~ but people can change it if they need to (a bit like how HuggingFace sets up their model / data cache).

AmenRa commented 1 year ago

Environment variables are for geeks :)

I will add a parameter to specify where to save/load the index and the environment variable (it's probably handy for multi-drive setups, thanks for the suggestion).

AmenRa commented 1 year ago

Hi @martiansideofthemoon, you can now change the working directory as shown here. Please, take a look at the many new features introduced in v0.2.0. Feedback is welcome!