Переиндексация
Sometimes the ord
database must be reindexed, which means deleting the database and restarting the indexing process with either ord index update
or ord server
. Reasons to reindex are:
- Новый основной релиз ord, в котором изменена схема базы данных
- База данных каким-то образом была повреждена
База данных, которую использует ord
, называется redb, поэтому по умолчанию мы присваиваем индексу имя файла index.redb
. По умолчанию мы храним этот файл в разных местах в зависимости от операционной системы.
OC | Value | Пример |
---|---|---|
Linux | $XDG_DATA_HOME /ord or $HOME /.local/share/ord | /home/alice/.local/share/ord |
macOS | $HOME /Library/Application Support/ord | /Users/Alice/Library/Application Support/ord |
Windows | {FOLDERID_RoamingAppData} \ord | C:\Users\Alice\AppData\Roaming\ord |
Поэтому для удаления базы данных и повторной индексации на MacOS необходимо выполнить в терминале следующие команды:
rm ~/Library/Application Support/ord/index.redb
ord index update
You can of course also set the location of the data directory yourself with ord --datadir <DIR> index update
or give it a specific filename and path with ord --index <FILENAME> index update
.