An open source, non-profit web search engine
Remove unnecessary 'positions' field
Daoud Clarke1df9cf0a7f03
diff --git a/mwmbl/format.py b/mwmbl/format.pyindex 1696fc0..9fcfcce 100644--- a/mwmbl/format.py+++ b/mwmbl/format.py@@ -111,6 +111,5 @@ def format_result_v2(result, position: int, query: str) -> dict:'content': content,'content_highlights': _extract_highlights(v1['extract']),'engine': get_document_source(result.state),- 'positions': [position],'score': 1.0 / position,}diff --git a/mwmbl/tinysearchengine/search.py b/mwmbl/tinysearchengine/search.pyindex 7f15cf6..86e57ff 100644--- a/mwmbl/tinysearchengine/search.py+++ b/mwmbl/tinysearchengine/search.py@@ -72,12 +72,11 @@ class SearxResult(Schema):"""A single search result in SearXNG-compatible format."""url: strtitle: str+ title_highlights: list[str]content: str+ content_highlights: list[str]engine: str- positions: list[int]score: float- title_highlights: list[str]- content_highlights: list[str]class SearchResponse(Schema):