searxng/docs/dev/engines/offline/nosql-engines.rst
Markus Heiser 5720844fcd [doc] rearranges Settings & Engines docs for better readability
We have built up detailed documentation of the *settings* and the *engines* over
the past few years.  However, this documentation was still spread over various
chapters and was difficult to navigate in its entirety.

This patch rearranges the Settings & Engines documentation for better
readability.

To review new ordered docs::

   make docs.clean docs.live

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-07-01 22:45:19 +02:00

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