Improve PostgreSQL serach a little
This commit is contained in:
parent
c1f5815b4b
commit
2838a3cc2a
@ -236,7 +236,7 @@ func (db *postgresDatabase) QueryTorrents(
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if and .QueryExists .FirstPage }} WHERE {{ end }}
|
{{ if and .QueryExists .FirstPage }} WHERE {{ end }}
|
||||||
{{ if .QueryExists }}
|
{{ if .QueryExists }}
|
||||||
to_tsvector(replace(replace(name, '.', ' '), '-', ' ')) @@ plainto_tsquery('{{ .Query }}')
|
to_tsvector(replace(replace(name, '.', ' '), '-', ' ')) @@ websearch_to_tsquery('{{ .Query }}')
|
||||||
{{ end }}
|
{{ end }}
|
||||||
ORDER BY {{.OrderOn}} {{AscOrDesc .Ascending}}
|
ORDER BY {{.OrderOn}} {{AscOrDesc .Ascending}}
|
||||||
LIMIT {{.Limit}};
|
LIMIT {{.Limit}};
|
||||||
|
Loading…
Reference in New Issue
Block a user