diff --git a/src/search.js b/src/search.js index d1f649b..33fe4dd 100644 --- a/src/search.js +++ b/src/search.js @@ -27,7 +27,10 @@ export function search_criteria(text) { } const [field, value] = t.split(op); if (op == ":") { - return { op: "ilike", field, value: `%${t}%` }; + if (field == "tracker") { + return { op: "has", field: "tracker_urls", value }; + } + return { op: "ilike", field, value }; } if (!isNaN(numeral(value).value())) { return { diff --git a/src/ui/search_help.js b/src/ui/search_help.js index 3c1bcac..2105daa 100644 --- a/src/ui/search_help.js +++ b/src/ui/search_help.js @@ -28,7 +28,9 @@ function SearchHelp(props) { "throttle_down": "throttle down in bits/sec", "transferred_up": "total transfer up in bits/sec", "transferred_down": "total transfer down in bits/sec", + "tracker": "tracker url", "peers": "number of peers", + "trackers": "number of trackers", "files": "number of files", }; @@ -70,6 +72,7 @@ function SearchHelp(props) {
  • {searchLink("files>1")}
  • {searchLink("files==1")}
  • {searchLink("progress<0.1")}
  • +
  • {searchLink("tracker:archlinux.org")}
  • );