Assuming that elasticsearch is working and you have all connection information. If not, please use elasticsearch install guide which is not part of this guide.
Use these commands on clean machine.
Do not try this on already configured system!
Change settings according to your elasticsearch instance.
Do not input spaces between = and arguments!
cd $HOME
mkdir .fcpc
cat <<EOF >.fcpc/config.cli
## Elastic settings
--db.driver=elastic
--db.elastic.prefix=fcpc_production
--db.elastic.user=fcpa
--db.elastic.password=<password>
--db.elastic.url=https://<elasticserver>:9200
--db.elastic.ssl_check=force
--db.elastic.crt=<file>
EOF
cd $HOME
mkdir .fcpc
cat <<EOF >.fcpc/config.cli
## Elastic settings
--db.driver=elastic
--db.elastic.prefix=fcpc_test
--db.elastic.url=http://localhost:9200
--db.elastic.ssl_check=ignore
EOF
Now we need to initialise database.
This will erase entire database with specified prefix!
Double check server settings and prefix before answering 'yes'.
fcpc db erase
Do you really want to erase this DB 'http://localhost:9200/fcpa_test' [yes/no]?yes
[562/2022-07-22 12:04:53,129] fcp:WARNING [db.py:515] Elasticsearch database http://localhost:9200/fcpa_test cleared to empty state.
fcpc list tags
id name created modified tagtype description------------------------- ------------------------- -------------------- -------------------- --------- -------------------------------------------
account_disabled account:disabled 2022-03-09T12:01:55Z 2022-03-09T11:01:55Z 0 Account is disabled, defined in fcplib.o...
account_expired account:expired 2022-03-09T12:01:55Z 2022-03-09T11:01:55Z 0
...
[594/2022-07-22 12:30:07,822] fcp:WARNING [list.py:283] Query limit in action! Returning only first 100 rows. See --filter.limit