fix: the Open/Resolved and Chains filters apply an exact rule's slash, case and query options (WR-22)
coveredSQL and chainSQL compared the source literally, so /missing/ or /missing?utm=x stayed open after /missing answered it, and /a -> /b/ was no chain next to /b. Both now use one SQL form of the runtime's exact match (prefiltered on the indexed source_key). Pattern and regex rules remain with the per-row badge, which the list_not_found schema text now says.
This commit is contained in:
@@ -41,9 +41,11 @@ const (
|
||||
// FilterScopes lists the 404 log's filter scopes.
|
||||
func (NotFound) FilterScopes() []string { return []string{FilterNotFoundStatus} }
|
||||
|
||||
// coveredSQL is true for an entry an exact redirect or 410 answers now
|
||||
// (the list filter; the Resolved badge also counts patterns and regex).
|
||||
const coveredSQL = `EXISTS (SELECT 1 FROM golem15_seo_redirects AS r WHERE r.match = 'exact' AND (r.source = golem15_seo_notfound.url OR (r.ignore_case AND lower(r.source) = lower(golem15_seo_notfound.url))))`
|
||||
// coveredSQL is true for an entry an exact redirect or 410 answers now,
|
||||
// with the rule's case, trailing-slash and query options as the runtime
|
||||
// matcher applies them (WR-22). Pattern and regex rules are left to the
|
||||
// Resolved badge, which runs the compiled rule set.
|
||||
var coveredSQL = `EXISTS (SELECT 1 FROM golem15_seo_redirects AS r WHERE ` + coversSQL("r", "golem15_seo_notfound.url") + `)`
|
||||
|
||||
// FilterScope narrows the 404 log to open or resolved entries; an unknown
|
||||
// value matches nothing.
|
||||
|
||||
Reference in New Issue
Block a user