Переиндексация

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:

  1. Новый основной релиз ord, в котором изменена схема базы данных
  2. База данных каким-то образом была повреждена

База данных, которую использует ord, называется redb, поэтому по умолчанию мы присваиваем индексу имя файла index.redb. По умолчанию мы храним этот файл в разных местах в зависимости от операционной системы.

OCValueПример
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}\ordC:\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.