mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Tighten up the search a little
This commit is contained in:
parent
c1295a6461
commit
51b7c257a6
@ -27,7 +27,7 @@ pub async fn search_devices(
|
||||
from shaped_devices, input
|
||||
where
|
||||
key = $2 AND
|
||||
input.q <% (circuit_name || ' ' || device_name || ' ' || mac)
|
||||
(input.q <<-> (circuit_name || ' ' || device_name || ' ' || mac)) < 0.15
|
||||
order by input.q <<-> (circuit_name || ' ' || device_name || ' ' || mac)";
|
||||
|
||||
let rows = sqlx::query_as::<_, DeviceHit>(SQL)
|
||||
@ -83,7 +83,7 @@ pub async fn search_sites(
|
||||
from site_tree, input
|
||||
where
|
||||
key = $2 AND
|
||||
input.q <% site_name
|
||||
(input.q <<-> site_name) < 0.15
|
||||
order by input.q <<-> site_name";
|
||||
|
||||
let rows = sqlx::query_as::<_, SiteHit>(SQL)
|
||||
|
Loading…
Reference in New Issue
Block a user