From a494b8f35ba75ba051a41466d8377fb09b115172 Mon Sep 17 00:00:00 2001 From: Felipe Garcia Date: Sat, 8 Mar 2025 12:00:20 -0300 Subject: [PATCH 1/3] Update keyword filter for improved search accuracy --- definitions/v10/f1carreras-api.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/definitions/v10/f1carreras-api.yml b/definitions/v10/f1carreras-api.yml index 738ec36d9..4d9ae38f7 100644 --- a/definitions/v10/f1carreras-api.yml +++ b/definitions/v10/f1carreras-api.yml @@ -97,8 +97,10 @@ search: keywordsfilters: - name: re_replace args: ["\\.", " "] - - name: re_replace # S2024 to 2024 and S2024E97 to 2024 97 - args: ["\\b(?:S(\\d{2,4}))(?:E(\\d{2,4}))?\\b", "$1 $2"] + # disabled to find better matches as agreed on F1Carreras Discord + # searching for "Formula1 2024 97" returns nothing, but "Formula1 S2024E97" works just fine + # - name: re_replace # S2024 to 2024 and S2024E97 to 2024 97 + # args: ["\\b(?:S(\\d{2,4}))(?:E(\\d{2,4}))?\\b", "$1 $2"] - name: trim rows: From 07bb255384ba2afab39d3c38b5677e679d635f8c Mon Sep 17 00:00:00 2001 From: Felipe Garcia Date: Mon, 10 Mar 2025 15:53:39 -0300 Subject: [PATCH 2/3] Update regex to comply with meilisearch query --- definitions/v10/f1carreras-api.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/definitions/v10/f1carreras-api.yml b/definitions/v10/f1carreras-api.yml index 4d9ae38f7..9d736763d 100644 --- a/definitions/v10/f1carreras-api.yml +++ b/definitions/v10/f1carreras-api.yml @@ -96,11 +96,11 @@ search: keywordsfilters: - name: re_replace - args: ["\\.", " "] - # disabled to find better matches as agreed on F1Carreras Discord - # searching for "Formula1 2024 97" returns nothing, but "Formula1 S2024E97" works just fine - # - name: re_replace # S2024 to 2024 and S2024E97 to 2024 97 - # args: ["\\b(?:S(\\d{2,4}))(?:E(\\d{2,4}))?\\b", "$1 $2"] + args: ["\\.", " "] # Replace dots with spaces + - name: re_replace # Convert S2024E97 → S2024x97 + args: ["\\bS(\\d{2,4})E(\\d{2,4})\\b", "S$1x$2"] + - name: re_replace # Convert S2024 to 2024 (ONLY if NOT followed by 'x') + args: ["\\bS(\\d{2,4})(?!x\\d{2,4})\\b", "$1"] - name: trim rows: From 68f8951626132ecb050bc945a841bad9836c8c2f Mon Sep 17 00:00:00 2001 From: Tiramisu Date: Mon, 18 Aug 2025 08:48:13 -0300 Subject: [PATCH 3/3] Update regex definition Co-authored-by: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> --- definitions/v10/f1carreras-api.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/v10/f1carreras-api.yml b/definitions/v10/f1carreras-api.yml index 9d736763d..a6b92ad52 100644 --- a/definitions/v10/f1carreras-api.yml +++ b/definitions/v10/f1carreras-api.yml @@ -99,8 +99,8 @@ search: args: ["\\.", " "] # Replace dots with spaces - name: re_replace # Convert S2024E97 → S2024x97 args: ["\\bS(\\d{2,4})E(\\d{2,4})\\b", "S$1x$2"] - - name: re_replace # Convert S2024 to 2024 (ONLY if NOT followed by 'x') - args: ["\\bS(\\d{2,4})(?!x\\d{2,4})\\b", "$1"] + - name: re_replace # Convert S2024 to 2024 + args: ["\\bS(\\d{2,4})\\b", "$1"] - name: trim rows: