searxng/docs/dev
Markus Heiser 36a1ef1239 [refactor] typification of SearXNG / EngineResults
In [1] and [2] we discussed the need of a Result.results property and how we can
avoid unclear code.  This patch implements a class for the reslut-lists of
engines::

    searx.result_types.EngineResults

A simple example for the usage in engine development::

    from searx.result_types import EngineResults
    ...
    def response(resp) -> EngineResults:
        res = EngineResults()
        ...
        res.add( res.types.Answer(answer="lorem ipsum ..", url="https://example.org") )
        ...
        return res

[1] https://github.com/searxng/searxng/pull/4183#pullrequestreview-257400034
[2] https://github.com/searxng/searxng/pull/4183#issuecomment-2614301580
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-01-28 07:07:08 +01:00
..
answerers [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
engines [refactor] typification of SearXNG / EngineResults 2025-01-28 07:07:08 +01:00
plugins [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
result_types [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
searxng_extra [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
contribution_guide.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
csv_table.txt docs: reST-primer describe table markup (WIP) 2019-12-20 20:39:14 +01:00
extended_types.rst [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
hello.dot doc: add content to reST primer (WIP) // linuxdoc 2019-12-19 23:36:53 +01:00
index.rst [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
lxcdev.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
makefile.rst [fix] pip install -e: legacy editable install (setup.py develop) is deprecated 2024-08-21 12:09:14 +02:00
quickstart.rst [fix] build workflows of the themes 2025-01-16 10:51:33 +01:00
reST.rst [fix] remove twine from requirements-dev 2024-02-16 18:29:40 +01:00
rtm_asdf.rst [dev] manage runtime versions with asdf 2023-11-12 20:54:57 +01:00
search_api.rst [feat] hostname replace plugin: possibility to prioritize certain websites 2024-06-07 14:42:52 +02:00
svg_image.svg doc: add content to reST primer (WIP) // linuxdoc 2019-12-19 23:36:53 +01:00
templates.rst [refactor] typification of SearXNG (initial) / result items (part 1) 2025-01-28 07:07:08 +01:00
translation.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
translation.svg [fix] translation: lock weblate only when there is an actual change of messages.pot 2021-09-06 17:16:51 +02:00