-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Currently, word searches are completely unsorted and will appear in a random order. I've been trying to figure out a proper way to order words (by frequency and/or relevance) however I've been unsuccessful so far. I've tried using the freq table to sort on the columns kw and value however that does not work properly.
Trying to figure out a proper way to sort words is tricky and will require more attention.
Ordering by kw and value does not yield favourable results;
SELECT entries.entr
FROM (SELECT entr
FROM kanj
WHERE lower(txt) $equals lower(:q)
UNION ALL
SELECT entr
FROM rdng
WHERE txt $equals hiragana(:reading)
OR txt $equals katakana(:reading)
UNION ALL
SELECT entr
FROM gloss
WHERE lower(txt) $equals lower(:q)) entries
LEFT JOIN freq ON freq.entr = entries.entr AND freq.rdng IS NOT NULL AND freq.kanj IS NULL
ORDER BY freq.kw, freq.valueMetadata
Metadata
Assignees
Labels
No labels