Parameters
Runtime parameters for crystalline are defined via environment variables prefixed with CRYSTALLINE_. The following table lists the available parameters and their default values:
| Parameter | Default | Description |
|---|---|---|
| CRYSTALLINE_DB_DIR | /var/lib/crystalline/db | Directory containing the configuration database |
| CRYSTALLINE_DATA_DIR | /var/lib/crystalline/data | Directory containing stored data and index contents |
| CRYSTALLINE_CACHE_DIR | /var/lib/crystalline/cache | Directory containing temporary files such as search results |
| CRYSTALLINE_EXTRA_DIR | /var/lib/crystalline/extra | Directory containing additional configurations such as lookups or rulesets |
| CRYSTALLINE_HTTP_IP | 0.0.0.0 | IP address to bind the HTTP server to |
| CRYSTALLINE_HTTP_PORT | 8080 | Port number to bind the HTTP server to |
| CRYSTALLINE_BATCH_SIZE | 500 | Maximum number of documents a bucket will return at a time when searching |
| CRYSTALLINE_SCALE_FACTOR | CPU-based calculation | Determines how parallelisation happens across the program |
| CRYSTALLINE_PARALLEL_BUCKET_READERS | CPU-based calculation | Number of buckets that can be read from in parallel |
| CRYSTALLINE_PARALLEL_BUCKET_WRITERS | CPU-based calculation | Number of buckets that can be written to in parallel |
| CRYSTALLINE_WRITER_WORKER_THREADS | CPU-based calculation | Number of threads each bucket writer will use |
| CRYSTALLINE_WRITER_WORKER_MEM | 16 | Amount of memory (in MiB) per bucket writer worker thread |
| CRYSTALLINE_INDEX_COMPRESSION | true | Enable or disable index compression |
| CRYSTALLINE_IDLE_READER_TIMEOUT | 10 | Timeout in seconds after which an idle bucket reader is stopped |
| CRYSTALLINE_IDLE_WRITER_TIMEOUT | 60 | Timeout in seconds after which an idle bucket writer is stopped |
| CRYSTALLINE_COMMIT_INTERVAL | 5 | Time in seconds before forcing bucket writers to commit changes to disk |
| CRYSTALLINE_SEARCH_JOB_TTL | 7200 (2 hours) | Time in seconds after which search results are deleted from cache |
| CRYSTALLINE_BOOTSTRAP_CONFIG | Not set | Path to a bootstrap JSON file to initialise application configuration |