F1Carreras : Update keyword filter for improved search accuracy#527
F1Carreras : Update keyword filter for improved search accuracy#527tiramisuflavor wants to merge 3 commits intoProwlarr:masterfrom
Conversation
definitions/v10/f1carreras-api.yml
Outdated
| - 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 |
There was a problem hiding this comment.
This was an workaround for both Formula1 S2024E97 and Formula1 2024x97 formats. Unless 2024x97 is not being used at all, your change breaks matching both formats.
Sadly when I pushed the change it worked fine for both AFAIK.
There was a problem hiding this comment.
Thanks for you review and insights. Let me collect some data and see if there’s any better alternative.
There was a problem hiding this comment.
I've been playing around with the meilisearch engine they have and finally found a way to get both formats working. It's not very intuitive, but it's the price of a full-text search mechanism.
Example Inputs & Expected Outputs:
| Input | Step 1 (SxxExx → SxxXxx) | Step 2 (Sxx → xx, if no x) | Final Output | Expected Results |
|---|---|---|---|---|
S2024E103 |
S2024x103 |
(unchanged) | S2024x103 |
S2024E103 and 2024x103 |
S2024 |
(unchanged) | 2024 |
2024 |
2024 Season Release |
There was a problem hiding this comment.
Formula1 "S2024E97" returns 1 result - Formula1 S2024E97
Formula1 S2024x97 returns 1 result - Formula1 S2024E97 (same as ^)
Formula1 "2024x97" returns 1 result - Formula1 2024x97
Quotation marks seem to be required in some cases, as the tracker will return irrelevant results otherwise.
Doesn't look like there's a simple one size fits all fix for this. Best case scenario is going to be finding which returns the most results most of the time.
From a very quick look, I found that NTT "S2025e37" and NTT S2025x37 will return the same one response, but there's nothing for NTT "2025x37". You'd need to look at more examples.
Co-authored-by: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com>
|



Disabled regex to find better matches as agreed on F1Carreras Discord. Searching for "Formula1 2024 97" returns nothing, but "Formula1 S2024E97" works just fine.