Ahmia search engine use elasticsearch to index content.
Please install elastic search from the official repository thanks to the official guide
Default configuration is enough to run index in dev mode. Here is suggestion for a more secure configuration
elasticsearch - nofile unlimited
elasticsearch - memlock unlimited
on CentOS/RH: /etc/sysconfig/elasticsearch
ES_HEAP_SIZE=2g # Half of your memory, other half is for Lucene
MAX_OPEN_FILES=1065535
MAX_LOCKED_MEMORY=unlimited
bootstrap.mlockall: true
script.engine.groovy.inline.update: on
script.engine.groovy.inline.aggs: on
# systemctl start elasticsearch
Please do this when running for the first time
$ curl -XPUT -i "localhost:9200/crawl-2017-10/" -H 'Content-Type: application/json' -d "@./mappings.json"
$ curl -XPUT -i "localhost:9200/crawl-2017-11/" -H 'Content-Type: application/json' -d "@./mappings.json"
$ curl -XPUT -i "localhost:9200/crawl-2017-12/" -H 'Content-Type: application/json' -d "@./mappings.json"
or
$ bash setup_index.sh
$ python3 point_to_indexes.py
$ bash call_filtering.sh
# Every day
50 09 * * * cd /usr/local/home/juha/ahmia-index && bash call_filtering.sh > ./filter.log 2>&1
# Once a month
10 04 16 * * cd /usr/local/home/juha/ahmia-index && ./venv3/bin/python point_to_indexes.py > ./change_alias.log 2>&1