summaryrefslogtreecommitdiff
path: root/searx/settings.yml
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-05-27 14:27:11 +0200
committerAlexandre Flament <alex@al-f.net>2021-05-27 14:27:11 +0200
commit2ea34a3c36d444fa5afac381a417d66bc96849e5 (patch)
treea806f5a2660767e3bb33fd2a4ca9355ca98da722 /searx/settings.yml
parent7c76cef746a90542f7db7a9ca876e763d0aad1a3 (diff)
[enh] add offline engine for sqlite database
To test & demonstrate this implementation download: https://liste.mediathekview.de/filmliste-v2.db.bz2 and unpack into searx/data/filmliste-v2.db, in your settings.yml define a sqlite engine named "demo":: - name : demo engine : sqlite shortcut: demo categories: general result_template: default.html database : searx/data/filmliste-v2.db query_str : >- SELECT title || ' (' || time(duration, 'unixepoch') || ')' AS title, COALESCE( NULLIF(url_video_hd,''), NULLIF(url_video_sd,''), url_video) AS url, description AS content FROM film WHERE title LIKE :wildcard OR description LIKE :wildcard ORDER BY duration DESC disabled : False Query to test: "!demo concert" This is a rewrite of the implementation from commit [1] [1] searx/searx@8e90a21 Suggested-by: @virtadpt searx/searx#2808
Diffstat (limited to 'searx/settings.yml')
-rw-r--r--searx/settings.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/searx/settings.yml b/searx/settings.yml
index b0c425e4f..21c4e8e0e 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -1003,6 +1003,26 @@ engines:
timeout : 3.0
disabled : True
+ # For this demo of the sqlite engine download:
+ # https://liste.mediathekview.de/filmliste-v2.db.bz2
+ # and unpack into searx/data/filmliste-v2.db
+ # Query to test: "!demo concert"
+ #
+ # - name : demo
+ # engine : sqlite
+ # shortcut: demo
+ # categories: general
+ # result_template: default.html
+ # database : searx/data/filmliste-v2.db
+ # query_str : >-
+ # SELECT title || ' (' || time(duration, 'unixepoch') || ')' AS title,
+ # COALESCE( NULLIF(url_video_hd,''), NULLIF(url_video_sd,''), url_video) AS url,
+ # description AS content
+ # FROM film
+ # WHERE title LIKE :wildcard OR description LIKE :wildcard
+ # ORDER BY duration DESC
+ # disabled : False
+
- name : torrentz
engine : torrentz
shortcut : tor