Anserini uses cache directories for storing various resources, such as:
- Pre-built indexes
- Encoder models
- Topics and qrels files
By default, these are stored in your home directory under ~/.cache/pyserini/.
- Indexes:
~/.cache/pyserini/indexes/ - Encoders:
~/.cache/pyserini/encoders/ - Topics and Qrels:
~/.cache/pyserini/topics-and-qrels/
You can customize these paths using environment variables.
# Set custom cache directory for indexes
export ANSERINI_INDEX_CACHE=/path/to/custom/index/cache
# Set custom cache directory for encoders
export ANSERINI_ENCODER_CACHE=/path/to/custom/encoder/cache
# Set custom cache directory for topics and qrels
export ANSERINI_TOPICS_CACHE=/path/to/custom/topics/cacheWhen resolving cache directories, Anserini checks for locations in the following order:
- System property (e.g.,
anserini.index.cache) - Environment variable (e.g.,
ANSERINI_INDEX_CACHE) - Default location in the user home directory