<commit_before><commit_msg>added instructions for db setup on fedora (should work on most linux flavours)<commit_after># steps to set up the database for INDX on Fedora, should work on most Linux distros

# 1. create the folder where the data will be stored, change ownership to the postgres user
mkdir /path/to/database/folder
sudo chown -R postgres:postgres /path/to/database/folder

# 2. initialize the database space (cluster) - as the postgres user
sudo su -c "initdb -D /path/to/database/folder" postgres

# 3. run the db server - as the postgres user
sudo su -c "postgres -D /path/to/database/folder &" postgres

# 4. connect to the db server via the cl client
psql -U postgres

# 5. in the postgres client, create a role called indx and grant privileges
create user indx with createdb createrole login password '<PASSWORD>';

# or 
# create user indx with createdb login password '<PASSWORD>';
# alter user indx with createrole;
{'fraction_non_alphanumeric': 0.07264957264957266, 'fraction_numerical': 0.005341880341880342, 'mean_word_length': 4.176795580110498, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1273694', 'n_tokens_mistral': 281, 'n_tokens_neox': 267, 'n_words': 134}