word_search: remove duplicate results
This commit is contained in:
@@ -82,12 +82,13 @@ String _filterFTSSensitiveCharacters(String word) {
|
||||
${!countOnly ? 'LIMIT ?' : ''}
|
||||
)
|
||||
|
||||
${countOnly ? 'SELECT COUNT("entryId") AS count' : 'SELECT "entryId", "score"'}
|
||||
${countOnly ? 'SELECT COUNT("entryId") AS count' : 'SELECT "entryId", MAX("score") AS "score"'}
|
||||
FROM (
|
||||
SELECT * FROM fts_results
|
||||
UNION ALL
|
||||
UNION
|
||||
SELECT * FROM non_fts_results
|
||||
)
|
||||
GROUP BY "entryId"
|
||||
'''
|
||||
.trim(),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user