Add kana independent search with tamerye extension
This commit is contained in:
@@ -67,14 +67,14 @@ String _filterFTSSensitiveCharacters(String word) {
|
||||
SELECT DISTINCT
|
||||
"$tableName"."entryId",
|
||||
100
|
||||
+ (("${tableName}FTS"."reading" = ?) * 10000)
|
||||
+ (("${tableName}FTS"."reading" = normalize_jp(?)) * 10000)
|
||||
+ (("$tableName"."orderNum" = 0) * 20)
|
||||
+ COALESCE("JMdict_EntryScore"."score", 0)
|
||||
AS "score"
|
||||
FROM "${tableName}FTS"
|
||||
JOIN "$tableName" USING ("elementId")
|
||||
LEFT JOIN "JMdict_EntryScore" USING ("elementId")
|
||||
WHERE "${tableName}FTS"."reading" MATCH ? || '*'
|
||||
WHERE "${tableName}FTS"."reading" MATCH normalize_jp(?) || '*'
|
||||
),
|
||||
non_fts_results AS (
|
||||
SELECT DISTINCT
|
||||
@@ -85,7 +85,7 @@ String _filterFTSSensitiveCharacters(String word) {
|
||||
AS "score"
|
||||
FROM "$tableName"
|
||||
LEFT JOIN "JMdict_EntryScore" USING ("elementId")
|
||||
WHERE "reading" LIKE '%' || ? || '%'
|
||||
WHERE "reading" LIKE '%' || normalize_jp(?) || '%'
|
||||
AND "$tableName"."entryId" NOT IN (SELECT "entryId" FROM "fts_results")
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
const int jadbSchemaVersion = 1;
|
||||
const int jadbSchemaVersion = 2;
|
||||
|
||||
Reference in New Issue
Block a user