mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
fix(server): penalize null geodata fields when searching places (#8408)
This commit is contained in:
@@ -254,15 +254,15 @@ WHERE
|
||||
OR f_unaccent ("admin1Name") %>> f_unaccent ($1)
|
||||
OR f_unaccent ("alternateNames") %>> f_unaccent ($1)
|
||||
ORDER BY
|
||||
COALESCE(f_unaccent (name) <->>> f_unaccent ($1), 0) + COALESCE(
|
||||
COALESCE(f_unaccent (name) <->>> f_unaccent ($1), 0.1) + COALESCE(
|
||||
f_unaccent ("admin2Name") <->>> f_unaccent ($1),
|
||||
0
|
||||
0.1
|
||||
) + COALESCE(
|
||||
f_unaccent ("admin1Name") <->>> f_unaccent ($1),
|
||||
0
|
||||
0.1
|
||||
) + COALESCE(
|
||||
f_unaccent ("alternateNames") <->>> f_unaccent ($1),
|
||||
0
|
||||
0.1
|
||||
) ASC
|
||||
LIMIT
|
||||
20
|
||||
|
||||
Reference in New Issue
Block a user