searxng/docs/dev/engines/offline/nosql-engines.rst

2.4 KiB

NoSQL databases

info

Initial sponsored by Search and Discovery Fund of NLnet Foundation.

The following NoSQL databases are supported:

  • engine redis_server
  • engine mongodb

All of the engines above are just commented out in the settings.yml <searx/settings.yml>, as you have to set various options and install dependencies before using them.

By default, the engines use the key-value template for displaying results / see simple <searx/templates/simple/result_templates/key-value.html> theme. If you are not satisfied with the original result layout, you can use your own template, set result_template attribute to {template_name} and place the templates at:

searx/templates/{theme_name}/result_templates/{template_name}

Furthermore, if you do not wish to expose these engines on a public instance, you can still add them and limit the access by setting tokens as described in section private engines.

Extra Dependencies

For using engine redis_server or engine mongodb you need to install additional packages in Python's Virtual Environment of your SearXNG instance. To switch into the environment (searxng-src) you can use searxng.sh:

$ sudo utils/searxng.sh instance cmd bash
(searxng-pyenv)$ pip install ...

Configure the engines

NoSQL databases are used for storing arbitrary data without first defining their structure.

Redis Server

info

  • pip install redis
  • redis.io
  • redis_server.py <searx/engines/redis_server.py>

searx.engines.redis_server

MongoDB

info

searx.engines.mongodb