nosql-engines.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. .. _nosql engines:
  2. ===============
  3. NoSQL databases
  4. ===============
  5. .. sidebar:: further read
  6. - `NoSQL databases <https://en.wikipedia.org/wiki/NoSQL>`_
  7. - `valkey.io <https://valkey.io/>`_
  8. - `MongoDB <https://www.mongodb.com>`_
  9. .. contents::
  10. :depth: 2
  11. :local:
  12. :backlinks: entry
  13. .. sidebar:: info
  14. Initial sponsored by `Search and Discovery Fund
  15. <https://nlnet.nl/discovery>`_ of `NLnet Foundation <https://nlnet.nl/>`_.
  16. The following `NoSQL databases`_ are supported:
  17. - :ref:`engine valkey_server`
  18. - :ref:`engine mongodb`
  19. All of the engines above are just commented out in the :origin:`settings.yml
  20. <searx/settings.yml>`, as you have to set various options and install
  21. dependencies before using them.
  22. By default, the engines use the ``key-value`` template for displaying results /
  23. see :origin:`simple <searx/templates/simple/result_templates/key-value.html>`
  24. theme. If you are not satisfied with the original result layout, you can use
  25. your own template, set ``result_template`` attribute to ``{template_name}`` and
  26. place the templates at::
  27. searx/templates/{theme_name}/result_templates/{template_name}
  28. Furthermore, if you do not wish to expose these engines on a public instance, you
  29. can still add them and limit the access by setting ``tokens`` as described in
  30. section :ref:`private engines`.
  31. Extra Dependencies
  32. ==================
  33. For using :ref:`engine valkey_server` or :ref:`engine mongodb` you need to
  34. install additional packages in Python's Virtual Environment of your SearXNG
  35. instance. To switch into the environment (:ref:`searxng-src`) you can use
  36. :ref:`searxng.sh`::
  37. $ sudo utils/searxng.sh instance cmd bash
  38. (searxng-pyenv)$ pip install ...
  39. Configure the engines
  40. =====================
  41. `NoSQL databases`_ are used for storing arbitrary data without first defining
  42. their structure.
  43. .. _engine valkey_server:
  44. Valkey Server
  45. -------------
  46. .. _valkey: https://github.com/andymccurdy/valkey-py#installation
  47. .. sidebar:: info
  48. - ``pip install`` valkey_
  49. - valkey.io_
  50. - :origin:`valkey_server.py <searx/engines/valkey_server.py>`
  51. .. automodule:: searx.engines.valkey_server
  52. :members:
  53. .. _engine mongodb:
  54. MongoDB
  55. -------
  56. .. _pymongo: https://github.com/mongodb/mongo-python-driver#installation
  57. .. sidebar:: info
  58. - ``pip install`` pymongo_
  59. - MongoDB_
  60. - :origin:`mongodb.py <searx/engines/mongodb.py>`
  61. .. automodule:: searx.engines.mongodb
  62. :members: