Lazy-load results
I would like to implement a lazy-loading feature into SearXNG.
Is your feature request related to a problem?
I really like to have WolframAlpha enabled on all searches, but it takes ~5s. I've also recently set up a YaCy instance, and it relies heavily on lazy-loading itself, because search results from peers keep trickling in over ~10s. With the current implementation of YaCy in SearXNG, only the very first results are loaded - which afaict is just results from the local index, which is in turn just a small part of the distributed index. Thus the results are usually completely irrelevant. The results in YaCy's own interface are way better, if you're a little patient.
Describe the solution you'd like
- Lazy loading would be completely optional
- If enabled, a websocket connection would be established on page load
- I'd use flask-uwsgi-websocket, since flask doesn't have any websocket abstractions built in, and low-level websocket handling is actually quite hard
- Over this connection, new results could be supplied as HTML snippets (I'd probably embed the priority rating as a custom attribute)
- On the client side, these results would be sorted in with a tiny bit of JS
Describe alternatives you've considered
A library or framework could be used, such as
- Python: Flask-Wire
- Light JS/HTML frameworks which utilize custom attributes for their magic:
However, I don't feel that this is in the spirit of this project.
Code of Conduct
- I read the AI Policy and hereby confirm that this issue conforms with the policy.
Source: searxng/searxng