Filter search should be order-independent #16443

Open
opened 2026-02-22 03:07:31 -05:00 by deekerman · 1 comment
Owner

Originally created by @cheater on GitHub (Dec 14, 2024).

Suggestion

In the simplest form, when searching for "Foo Bar", I also want to find "Bar Foo".

This is because I have a lot of Linux ISOs and sometimes the titles are formatted like this:

`Fedora.Linux.mach64.LTS.iso"

but sometimes they are like:

`Ubuntu.Linux.LTS.mach64.iso"

I would like to type "LTS mach64" into the filter and find both.

The exact algorithm would be like this:

  1. take the filter string
  2. break it up on spaces into separate items. watch out for multiple spaces. only spaces, no tabs or anything like that.
  3. apply the first filter, get list of results, apply 2nd filter on that, etc

If allowing regex, apply each filter as a regex

For performance, it's probably best to sort the filters like this:

  1. filters that are a simple substring search - i.e. don't use any regex features such as special characters (dot, asterisk, question mark, etc) and just use literal letters and numbers. those filters should be sorted longest to shortest
  2. all other filters, sorted shortest to longest

in order to be able to have a filter with a space that doesn't get broken up, one could use a dot instead. it's not perfect, but it'll probably work for 99% of all cases of torrent names.

Use case

No response

Extra info/examples/attachments

No response

Originally created by @cheater on GitHub (Dec 14, 2024). ### Suggestion In the simplest form, when searching for "Foo Bar", I also want to find "Bar Foo". This is because I have a lot of Linux ISOs and sometimes the titles are formatted like this: `Fedora.Linux.mach64.LTS.iso" but sometimes they are like: `Ubuntu.Linux.LTS.mach64.iso" I would like to type "LTS mach64" into the filter and find both. The exact algorithm would be like this: 1. take the filter string 2. break it up on spaces into separate items. watch out for multiple spaces. only spaces, no tabs or anything like that. 3. apply the first filter, get list of results, apply 2nd filter on that, etc If allowing regex, apply each filter as a regex For performance, it's probably best to sort the filters like this: 1. filters that are a simple substring search - i.e. don't use any regex features such as special characters (dot, asterisk, question mark, etc) and just use literal letters and numbers. those filters should be sorted longest to shortest 2. all other filters, sorted shortest to longest in order to be able to have a filter with a space that doesn't get broken up, one could use a dot instead. it's not perfect, but it'll probably work for 99% of all cases of torrent names. ### Use case _No response_ ### Extra info/examples/attachments _No response_
Author
Owner

@xavier2k6 commented on GitHub (May 25, 2025):

ANNOUNCEMENT!

For anybody coming across this "Feature Request" & would like/love to see a potential implementation in the future!
Here are some options available to you:

  1. Please select/click the 👍 &/orreactions in the original/opening post of this ticket.

  2. Please feel free (If you have the "skillset") to create a "Pull Request" implementing what's being requested in this ticket.
    (new/existing contributors/developers are always welcome)


DO:

  • Provide constructive feedback.
  • Display how other projects implemented same/similar etc.

DO NOT:

  • Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s).
    (These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)
@xavier2k6 commented on GitHub (May 25, 2025): ## ANNOUNCEMENT! For anybody coming across this **_"Feature Request"_** & would like/love to see a potential implementation in the future! **Here are some options available to you:** 1. Please select/click the 👍 **&/or** ❤ `reactions` in the original/opening post of this ticket. 2. Please feel free _(If you have the "skillset")_ to create a **_"Pull Request"_** implementing what's being requested in this ticket. **_(new/existing contributors/developers are always welcome)_** ____ **DO:** * Provide constructive feedback. * Display how other projects implemented same/similar etc. **DO NOT:** * Add a "Bump", "me too", "2nd/3rd" etc. or "criticizing" comment(s). **(These will be disregarded/hidden as "spam/abuse/off-topic" etc. as they don't provide anything constructive.)**
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#16443
No description provided.