From 5720844fcdc8601798e10544e2fd25ce4f2ad099 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 30 Jun 2023 18:07:02 +0200 Subject: [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 --- searx/engines/elasticsearch.py | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'searx/engines/elasticsearch.py') diff --git a/searx/engines/elasticsearch.py b/searx/engines/elasticsearch.py index f6e207b4d..7bddab1cb 100644 --- a/searx/engines/elasticsearch.py +++ b/searx/engines/elasticsearch.py @@ -1,6 +1,44 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -""" - Elasticsearch +""".. sidebar:: info + + - :origin:`elasticsearch.py ` + - `Elasticsearch `_ + - `Elasticsearch Guide + `_ + - `Install Elasticsearch + `_ + +Elasticsearch_ supports numerous ways to query the data it is storing. At the +moment the engine supports the most popular search methods (``query_type``): + +- ``match``, +- ``simple_query_string``, +- ``term`` and +- ``terms``. + +If none of the methods fit your use case, you can select ``custom`` query type +and provide the JSON payload to submit to Elasticsearch in +``custom_query_json``. + +Example +======= + +The following is an example configuration for an Elasticsearch_ instance with +authentication configured to read from ``my-index`` index. + +.. code:: yaml + + - name: elasticsearch + shortcut: es + engine: elasticsearch + base_url: http://localhost:9200 + username: elastic + password: changeme + index: my-index + query_type: match + # custom_query_json: '{ ... }' + enable_http: true + """ from json import loads, dumps -- cgit v1.2.3