search-indexer-engines.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ====================
  2. Local Search Engines
  3. ====================
  4. .. sidebar:: further read
  5. - `Comparison to alternatives
  6. <https://docs.meilisearch.com/learn/what_is_meilisearch/comparison_to_alternatives.html>`_
  7. Administrators might find themselves wanting to integrate locally running search
  8. engines. The following ones are supported for now:
  9. * `Elasticsearch`_
  10. * `Meilisearch`_
  11. * `Solr`_
  12. Each search engine is powerful, capable of full-text search. All of the engines
  13. above are added to ``settings.yml`` just commented out, as you have to
  14. ``base_url`` for all them.
  15. Please note that if you are not using HTTPS to access these engines, you have to enable
  16. HTTP requests by setting ``enable_http`` to ``True``.
  17. Furthermore, if you do not want to expose these engines on a public instance, you
  18. can still add them and limit the access by setting ``tokens`` as described in
  19. section :ref:`private engines`.
  20. .. _engine meilisearch:
  21. MeiliSearch
  22. ===========
  23. .. sidebar:: info
  24. - :origin:`meilisearch.py <searx/engines/meilisearch.py>`
  25. - `MeiliSearch <https://www.meilisearch.com>`_
  26. - `MeiliSearch Documentation <https://docs.meilisearch.com/>`_
  27. - `Install MeiliSearch
  28. <https://docs.meilisearch.com/learn/getting_started/installation.html>`_
  29. MeiliSearch_ is aimed at individuals and small companies. It is designed for
  30. small-scale (less than 10 million documents) data collections. E.g. it is great
  31. for storing web pages you have visited and searching in the contents later.
  32. The engine supports faceted search, so you can search in a subset of documents
  33. of the collection. Furthermore, you can search in MeiliSearch_ instances that
  34. require authentication by setting ``auth_token``.
  35. Here is a simple example to query a Meilisearch instance:
  36. .. code:: yaml
  37. - name: meilisearch
  38. engine: meilisearch
  39. shortcut: mes
  40. base_url: http://localhost:7700
  41. index: my-index
  42. enable_http: true
  43. .. _engine elasticsearch:
  44. Elasticsearch
  45. =============
  46. .. sidebar:: info
  47. - :origin:`elasticsearch.py <searx/engines/elasticsearch.py>`
  48. - `Elasticsearch <https://www.elastic.co/elasticsearch/>`_
  49. - `Elasticsearch Guide
  50. <https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html>`_
  51. - `Install Elasticsearch
  52. <https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html>`_
  53. Elasticsearch_ supports numerous ways to query the data it is storing. At the
  54. moment the engine supports the most popular search methods (``query_type``):
  55. - ``match``,
  56. - ``simple_query_string``,
  57. - ``term`` and
  58. - ``terms``.
  59. If none of the methods fit your use case, you can select ``custom`` query type
  60. and provide the JSON payload to submit to Elasticsearch in
  61. ``custom_query_json``.
  62. The following is an example configuration for an Elasticsearch_ instance with
  63. authentication configured to read from ``my-index`` index.
  64. .. code:: yaml
  65. - name: elasticsearch
  66. shortcut: es
  67. engine: elasticsearch
  68. base_url: http://localhost:9200
  69. username: elastic
  70. password: changeme
  71. index: my-index
  72. query_type: match
  73. # custom_query_json: '{ ... }'
  74. enable_http: true
  75. .. _engine solr:
  76. Solr
  77. ====
  78. .. sidebar:: info
  79. - :origin:`solr.py <searx/engines/solr.py>`
  80. - `Solr <https://solr.apache.org>`_
  81. - `Solr Resources <https://solr.apache.org/resources.html>`_
  82. - `Install Solr <https://solr.apache.org/guide/installing-solr.html>`_
  83. Solr_ is a popular search engine based on Lucene, just like Elasticsearch_. But
  84. instead of searching in indices, you can search in collections.
  85. This is an example configuration for searching in the collection
  86. ``my-collection`` and get the results in ascending order.
  87. .. code:: yaml
  88. - name: solr
  89. engine: solr
  90. shortcut: slr
  91. base_url: http://localhost:8983
  92. collection: my-collection
  93. sort: asc
  94. enable_http: true
  95. Acknowledgment
  96. ==============
  97. This development was sponsored by `Search and Discovery Fund
  98. <https://nlnet.nl/discovery>`_ of `NLnet Foundation <https://nlnet.nl/>`_.