diff options
| author | unwox <me@unwox.com> | 2024-10-10 15:13:16 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-10-10 15:13:16 +0600 |
| commit | 1520d83acccdcad2d7f87aec073b48d5f4995bf6 (patch) | |
| tree | 6845c3016a4b37954aeb4d7ef0879d5fe76c57cb /bin | |
| parent | 240aeb84855a153764830186d5f4e7f22873561c (diff) | |
fix queries with synonyms and several words
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/serve.fnl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/serve.fnl b/bin/serve.fnl index 63e4a3b..4d982c2 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -23,7 +23,9 @@ "шэн" "шен" "шен" "шэн" "доска" "чабань" - "чабань" "доска"}) + "чабань" "доска" + "термос" "бутылка" + "бутылка" "термос"}) (fn unescape [s] (assert (= (type s) :string) "s must be string") @@ -78,7 +80,7 @@ (.. "(" q "* OR " (. query-synonyms q) "*)") (.. q "*"))) (str.split query)) - " "))) + " AND "))) (local where-sql (array.join where-conds "\nAND ")) (local total |
