search-indexer-engines.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ===============================
  2. Query your local search engines
  3. ===============================
  4. From now on, searx lets you to query your locally running search engines. The following
  5. ones are supported now:
  6. * `Elasticsearch`_
  7. * `Meilisearch`_
  8. * `Solr`_
  9. All of the engines above are added to ``settings.yml`` just commented out, as you have to
  10. ``base_url`` for all them.
  11. Please note that if you are not using HTTPS to access these engines, you have to enable
  12. HTTP requests by setting ``enable_http`` to ``True``.
  13. Furthermore, if you do not want to expose these engines on a public instance, you can
  14. still add them and limit the access by setting ``tokens`` as described in the `blog post about
  15. private engines`_.
  16. Configuring searx for search engines
  17. ====================================
  18. Each search engine is powerful, capable of full-text search.
  19. Elasticsearch
  20. -------------
  21. Elasticsearch supports numerous ways to query the data it is storing. At the moment
  22. the engine supports the most popular search methods: ``match``, ``simple_query_string``, ``term`` and ``terms``.
  23. If none of the methods fit your use case, you can select ``custom`` query type and provide the JSON payload
  24. searx has to submit to Elasticsearch in ``custom_query_json``.
  25. The following is an example configuration for an Elasticsearch instance with authentication
  26. configured to read from ``my-index`` index.
  27. .. code:: yaml
  28. - name : elasticsearch
  29. shortcut : es
  30. engine : elasticsearch
  31. base_url : http://localhost:9200
  32. username : elastic
  33. password : changeme
  34. index : my-index
  35. query_type : match
  36. enable_http : True
  37. Meilisearch
  38. -----------
  39. This search engine is aimed at individuals and small companies. It is designed for
  40. small-scale (less than 10 million documents) data collections. E.g. it is great for storing
  41. web pages you have visited and searching in the contents later.
  42. The engine supports faceted search, so you can search in a subset of documents of the collection.
  43. Furthermore, you can search in Meilisearch instances that require authentication by setting ``auth_token``.
  44. Here is a simple example to query a Meilisearch instance:
  45. .. code:: yaml
  46. - name : meilisearch
  47. engine : meilisearch
  48. shortcut: mes
  49. base_url : http://localhost:7700
  50. index : my-index
  51. enable_http: True
  52. Solr
  53. ----
  54. Solr is a popular search engine based on Lucene, just like Elasticsearch.
  55. But instead of searching in indices, you can search in collections.
  56. This is an example configuration for searching in the collection ``my-collection`` and get
  57. the results in ascending order.
  58. .. code:: yaml
  59. - name : solr
  60. engine : solr
  61. shortcut : slr
  62. base_url : http://localhost:8983
  63. collection : my-collection
  64. sort : asc
  65. enable_http : True
  66. Next steps
  67. ==========
  68. The next step is to add support for various SQL databases.
  69. Acknowledgement
  70. ===============
  71. This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
  72. .. _blog post about private engines: private-engines.html#private-engines
  73. .. _Elasticsearch: https://www.elastic.co/elasticsearch/
  74. .. _Meilisearch: https://www.meilisearch.com/
  75. .. _Solr: https://solr.apache.org/
  76. .. _Search and Discovery Fund: https://nlnet.nl/discovery
  77. .. _NLnet Foundation: https://nlnet.nl/
  78. | Happy hacking.
  79. | kvch // 2021.04.07 23:16