From 786389a50b4c846d20fbda520e8bff777529f1af Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Fri, 20 Mar 2020 01:05:23 +0000 Subject: [PATCH] Fix land use group autofill --- app/src/api/services/autofill.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/api/services/autofill.ts b/app/src/api/services/autofill.ts index 27ab8cf3..8021a277 100644 --- a/app/src/api/services/autofill.ts +++ b/app/src/api/services/autofill.ts @@ -30,9 +30,9 @@ function getLanduseGroupOptions(value: string, all: boolean = false) { SELECT landuse_id AS id, description AS value, - ts_rank(to_tsvector(description), to_tsquery('simple', $1)) AS similarity + ts_rank(to_tsvector('simple', description), to_tsquery('simple', $1)) AS similarity FROM reference_tables.buildings_landuse_group - WHERE to_tsvector(description) @@ to_tsquery('simple', $1) + WHERE to_tsvector('simple', description) @@ to_tsquery('simple', $1) ORDER BY similarity DESC, description `, [query] );