diff --git a/scripts/pi-hole/js/search.js b/scripts/pi-hole/js/search.js
index a88dd030..cbbedd28 100644
--- a/scripts/pi-hole/js/search.js
+++ b/scripts/pi-hole/js/search.js
@@ -140,7 +140,41 @@ function eventsource(partial) {
result += "
";
}
- result += "Search took " + (1000 * data.took).toFixed(1) + " ms";
+ result += "Number of results per type:
";
+ result +=
+ " - " +
+ data.search.results.domains.exact +
+ " exact domain matches
";
+ result +=
+ " - " +
+ data.search.results.domains.regex +
+ " regex domain matches
";
+ result +=
+ " - " +
+ data.search.results.gravity.allow +
+ " allowlist (antigravity) matches
";
+ result +=
+ " - " +
+ data.search.results.gravity.block +
+ " blocklist (gravity) matches
";
+
+ if (
+ data.search.results.gravity.allow > data.search.parameters.N ||
+ data.search.results.gravity.block > data.search.parameters.N ||
+ data.search.results.domains.exact > data.search.parameters.N ||
+ data.search.results.domains.regex > data.search.parameters.N
+ ) {
+ result +=
+ "
Note: " +
+ "The number of results to return per type is limited to " +
+ data.search.parameters.N +
+ " entries.
There are " +
+ data.search.results.total +
+ " matching entries in total.
Consider " +
+ "using a more specific search term or increase N.
";
+ }
+
+ result += "
Search took " + (1000 * data.took).toFixed(1) + " ms";
ta.append(result);
})