.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.result_types.EngineResults Class Reference
Inheritance diagram for searx.result_types.EngineResults:
Collaboration diagram for searx.result_types.EngineResults:

Additional Inherited Members

Public Member Functions inherited from searx.result_types.ResultList
 __init__ (self)
 add (self, Result|LegacyResult result)
Public Member Functions inherited from searx.result_types._base.Result
 normalize_result_fields (self)
 __post_init__ (self)
 filter_urls (self, "Callable[[Result | LegacyResult, str, str], str | bool]" filter_func)
int __hash__ (self)
 __eq__ (self, object other)
 __setitem__ (self, str field_name, t.Any value)
t.Any __getitem__ (self, str field_name)
 __iter__ (self)
 as_dict (self)
 defaults_from (self, "Result" other)
Public Member Functions inherited from searx.result_types._base.LegacyResult
 as_dict (self)
 __init__ (self, *t.Any args, **t.Any kwargs)
t.Any __getattr__ (self, str name, t.Any default=UNSET)
 __setattr__ (self, str name, t.Any val)
int __hash__ (self)
 __eq__ (self, object other)
str __repr__ (self)
 normalize_result_fields (self)
 defaults_from (self, "LegacyResult" other)
 filter_urls (self, "Callable[[Result | LegacyResult, str, str], str | bool]" filter_func)
Public Attributes inherited from searx.result_types._base.LegacyResult
str template = "answer/legacy.html"
 engine
Static Public Attributes inherited from searx.result_types._base.Result
str url = None
str template = "default.html"
str engine = ""
urllib parsed_url = None
Static Public Attributes inherited from searx.result_types._base.LegacyResult
object UNSET = object()
str url | None
urllib parsed_url .parse.ParseResult | None
priority .Literal["", "high", "low"]
set engines [str]
list positions [int]
datetime publishedDate .datetime | None
str pubdate = ""
list urls [dict[str, str]]
list attributes [dict[str, str]]

Detailed Description

Result list that should be used by engine developers.  For convenience,
engine developers don't need to import types / see :py:obj:`ResultList.types`.

.. code:: python

   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

Definition at line 64 of file __init__.py.


The documentation for this class was generated from the following file:
  • /home/andrew/Documents/code/public/searxng/searx/result_types/__init__.py