Refined and Enhanced Global Search Bar

This commit is contained in:
2025-09-27 15:05:19 -06:00
parent a80f3c3193
commit 3778cce049
2 changed files with 119 additions and 49 deletions

View File

@@ -1484,6 +1484,9 @@ def search_suggest():
limit = 5
q_lc = q.lower()
# Do not suggest on very short queries to avoid dumping all rows
if len(q_lc) < 3:
return jsonify({"field": field, "q": q, "devices": [], "sites": []})
device_fields = {
"hostname": "hostname",