mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge branch 'fix-pg-trgm-operator' into 'main'
Fix search, use word_similarity operator Closes #213 See merge request soapbox-pub/ditto!498
This commit is contained in:
commit
d1f452d87b
2 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ export async function getPubkeysBySearch(
|
|||
'search',
|
||||
eb.fn('word_similarity', [sql`${q}`, 'search']).as('sml'),
|
||||
])
|
||||
.where(() => sql`${q} % search`)
|
||||
.where(() => sql`${q} <% search`)
|
||||
.orderBy(['sml desc', 'search'])
|
||||
.limit(limit);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue