Combining Multiple Search Filters

Discussion related to "Everything" 1.5.
Post Reply
kostas16
Posts: 3
Joined: Tue Feb 18, 2025 12:18 pm

Combining Multiple Search Filters

Post by kostas16 »

Hello,

How can I apply multiple filters in combination to a search? For example, I want to search for all files with 'car' in their name, then use the filter sidebar to narrow those results to files modified in the last 7 days, and finally filter again to show only those with the .txt extension.

I'm using Everything 1.5 Alpha.
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Combining Multiple Search Filters

Post by NotNull »

Code: Select all

ext:txt  dm:last7days  car
Search Functions


(Moved to the Everything 1.5 Alpha forum)
kostas16
Posts: 3
Joined: Tue Feb 18, 2025 12:18 pm

Re: Combining Multiple Search Filters

Post by kostas16 »

NotNull wrote: Tue Feb 18, 2025 1:35 pm

Code: Select all

ext:txt  dm:last7days  car
I want to achieve this result using the filters in the filter sidebar. I've created two filters: last 7 days (dm:last7days) and txt (ext:txt). I type car in the search field to see all files containing that word in their name. Then, I apply the last 7 days filter to narrow the results to files modified within the last 7 days. Finally, while holding Ctrl, I apply the txt filter to further refine the results and display only .txt files. However, while the last 7 days filter works correctly, the txt filter doesn't seem to be working; it's not limiting the results to .txt files.
Last edited by kostas16 on Tue Feb 18, 2025 4:36 pm, edited 2 times in total.
therube
Posts: 5723
Joined: Thu Sep 03, 2009 6:48 pm

Re: Combining Multiple Search Filters

Post by therube »

Never knew you could Ctrl them.
I can do something like Document AND Compressed.

But not Document AND Compressed AND dm: (where dm: is a filter).

Got me?


Oddly...
1. if I do a search 'mal' with Document filter, I get 1652 items.
2. I do a search 'mal' with Document filter AND dm filter (dm:list18days), I get 1677 items - more then with just Document.

So what is happening is that with 2. it is doing a Document OR dm filter.
And those additional items are the search of 'mal' and the dm filter items.


So are we doing an AND or an OR?
(I'm not using a good data set...)


Pretty sure using Ctrl in this way is an OR rather then an AND.
(Statusbar shows |, which on first look, I'm like oh, it's OR'ing. But then "seeing" results after combining filters, I'm like, oh it's AND'ing, but I think it was just my results that I was "seeing" appeared to be AND'ing, where in reality my results were OR'ing.)


And if that is the case, that Ctrl OR's, is there a way to have things AND?
(And, not AND, I have AND > OR in Options | General | Search, in case that matters.)
kostas16
Posts: 3
Joined: Tue Feb 18, 2025 12:18 pm

Re: Combining Multiple Search Filters

Post by kostas16 »

From what I understand, the filters work like an AND operation. For example, if I search for car, it will show me all files and folders containing car in their name. If I then apply a documents filter, it will show me only the files that contain the word car in their name and are documents. If I now also apply the last 7 days filter (dm:last7days), it will additionally show me all the files-folders that contain the word car in their name and have been modified in the last 7 days.

Based on the above, that's why in your example, you get 1652 items the first time, and applying the other filter results in 1677 items.

Perhaps it wouldn't be correct to use dm:last7days as a filter because it's not working as I'd like.

I'm not sure if there's a way to create a clickable element for dm:last7days (similar to the existing filters) that behaves the way I want. For example, I'd like to be able to type car in the search field, then click the txt filter along with the dm:last7days , and get the same results as if I had typed ext:txt dm:last7days car directly into the search field.
Last edited by kostas16 on Tue Feb 18, 2025 10:01 pm, edited 1 time in total.
brandySnake
Posts: 37
Joined: Fri Sep 24, 2021 3:00 pm

Re: Combining Multiple Search Filters

Post by brandySnake »

It seems to work like this (expressed in pseudocode).
In other words, it does not seem possible to use apply multiple filters to further narrow the range, at least at the moment.

Code: Select all

search_words & ( filter1 | filter2 | filterX... )
reitwal
Posts: 28
Joined: Sat Apr 09, 2016 9:19 am

Re: Combining Multiple Search Filters

Post by reitwal »

The modifiers and-filter: and or-filter: and the search function filter-group: could help here.

AND-Filter (modifier)
OR-Filter (modifier)
Filter Groups (search function)
AND-Filter example
Using Filter Groups
kostas16
Posts: 3
Joined: Tue Feb 18, 2025 12:18 pm

Re: Combining Multiple Search Filters

Post by kostas16 »

reitwal wrote: Tue Mar 04, 2025 1:45 pm The modifiers and-filter: and or-filter: and the search function filter-group: could help here.

AND-Filter (modifier)
OR-Filter (modifier)
Filter Groups (search function)
AND-Filter example
Using Filter Groups
Thank you very much, I added "and-filter:" at the beginning of the filter and now it works as I wanted it to.
Post Reply