Foxtrot query will not run with negation conditions, even if other conditions are applied [message #1460] |
Sat, 18 June 2022 09:09 |
Atlas
Messages: 140 Registered: August 2009
|
Senior Member |
|
|
I totally understand why a query with only negations like this would not run in Foxtrot query [-"regular expression" -regex], because it would probably produce too many results. However, this Foxtrot query still wouldn't run even when I apply additional conditions like "File name" must contain a string.
I have to run this type of query sometimes because I know the folder I want to narrow down to, so I do that using "File name" condition. And once I'm in the folder, I know the kind of files I don't want to see, so I want to get rid of them using Foxtrot Query. Unfortunately ... it doesn't look like I can do that in Foxtrot Search? How could it be done?
Thanks!
|
|
|
|
Re: Foxtrot query will not run with negation conditions, even if other conditions are applied [message #1466 is a reply to message #1463] |
Mon, 20 June 2022 01:22 |
Atlas
Messages: 140 Registered: August 2009
|
Senior Member |
|
|
I just tried this method, and realized that I made a mistake in describing the original problem. I get to the folder that I want by using the "path filter", and not "file name" filter, which is an advanced filter. Therefore, when I use the method described above, I would be using an advanced filter to get to the path, and then another two advanced filter to get rid of the words I don't want. Foxtrot has the condition that there must be at least one non-advanced filter and it has to be applied first. Since all of my conditions are advanced filter, it won't run.
|
|
|
Re: Foxtrot query will not run with negation conditions, even if other conditions are applied [message #1467 is a reply to message #1466] |
Mon, 20 June 2022 08:39 |
FoxTrot Engineering
Messages: 406 Registered: April 2020
|
Senior Member |
|
|
[all items of type] [any file or folder]
[then apply advanced filter] [full path] [contains the string] [] [foo]
[then apply advanced filter] [contents] [does not contain the regular expression] [] [regular expression]
[then apply advanced filter] [contents] [does not contain the regular expression] [] [regex]
Of course this will be slow, as the filters will be executed on each file; when possible you should reduce the scope as much as possible with other criteria before applying some filters.
Jérôme - FoxTrot Engineering
|
|
|
Re: Foxtrot query will not run with negation conditions, even if other conditions are applied [message #1468 is a reply to message #1467] |
Tue, 21 June 2022 02:22 |
Atlas
Messages: 140 Registered: August 2009
|
Senior Member |
|
|
Thanks. This looks like it should work. I didn't know that we can put [all items of type] [any file or folder] at the top. What's the effect of putting this condition on top versus bottom? In general, what's the order that Foxtrot will process conditions and how do they affect each other? I haven't seen this in documentation, and it will help me troubleshoot issues on my own going forward. Thanks for helping.
|
|
|
Re: Foxtrot query will not run with negation conditions, even if other conditions are applied [message #1469 is a reply to message #1468] |
Tue, 21 June 2022 14:54 |
FoxTrot Engineering
Messages: 406 Registered: April 2020
|
Senior Member |
|
|
The order of the search criteria should not matter (if it does, this should probably be regarded as a bug). However, filters ([then filter by date], [then apply advanced filter] and [then filter by spotlight attribute]) are always evaluated after the other criteria (even when you add some additional criteria below the filters).
As filters can be slow, you should always try to reduce the scope first with appropriate criteria. And if you have multiple filters, it should be faster to place the filter that reduces the scope the most before the other ones.
One of the purposes of [all items of type] is to let using filters when you have no other criterion, while pushing users to use a more restricting criterion.
Jérôme - FoxTrot Engineering
|
|
|
|