From 3bd714ea9d11baa4fa847ba9b75018dce7d65a58 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 25 Jun 2024 08:54:42 -0700 Subject: [PATCH] QA stats aggregation: exclude isFile / isError pages from stats (#1879) Follow-up to: #1868, exclude pages that have isFile or isError set to true from the stats aggregation. --- backend/btrixcloud/pages.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/btrixcloud/pages.py b/backend/btrixcloud/pages.py index 414a898a..dadb0e22 100644 --- a/backend/btrixcloud/pages.py +++ b/backend/btrixcloud/pages.py @@ -577,7 +577,13 @@ class PageOps: boundaries.append(1.1) aggregate = [ - {"$match": {"crawl_id": crawl_id}}, + { + "$match": { + "crawl_id": crawl_id, + "isFile": {"$ne": True}, + "isError": {"$ne": True}, + } + }, { "$bucket": { "groupBy": f"$qa.{qa_run_id}.{key}",