Ability to use both "AND" and "OR".

Have a suggestion for "Everything"? Please post it here.
Post Reply
HungerFreeze
Posts: 44
Joined: Tue May 02, 2017 4:04 pm

Ability to use both "AND" and "OR".

Post by HungerFreeze »

Is it possible to use both literal operators?

So, if I type "movie OR predictions", the search engine will first list results that have both terms and then results that have either term.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Ability to use both "AND" and "OR".

Post by void »

Please try the OR operator: |

movie | predictions

(seen as: movie OR predictions)



Everything will treat spaces as the AND operator.

movie predictions

(seen as: movie AND predictions)



Use ! as the NOT operator:
!movie predictions

(seen as NOT movie AND predictions)



The search operators can be found under Help -> Search Syntax.



To enable literal search operators:
  • In Everything, from the Tools menu, click Options.
  • Click the Search tab on the left.
  • Check Allow literal operators.
  • Click OK.
Now you can search for:
movie OR predictions

If you want to match files with OR in the filename, use double quotes:

"OR"
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Ability to use both "AND" and "OR".

Post by ChrisGreaves »

void wrote: Mon May 29, 2023 3:56 am !movie predictions
(seen as NOT movie AND predictions)
Hello Void.
As I understand it there is no ability to group search terms with parenthesis, as in:-
(!movie) predictions

which would translate to
(NOT movie ) AND predictions
Or to force the sequence of evaluation:
!(movie | predictions)

Thanks, Chris
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: Ability to use both "AND" and "OR".

Post by void »

Use < and > for grouping:

!<movies | predictions>
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Ability to use both "AND" and "OR".

Post by ChrisGreaves »

void wrote: Mon May 29, 2023 4:58 am Use < and > for grouping:
Thanks Void!
HungerFreeze
Posts: 44
Joined: Tue May 02, 2017 4:04 pm

Re: Ability to use both "AND" and "OR".

Post by HungerFreeze »

Would it be possible to use a search query that can execute both an AND and OR request?

For example, if you search for "movies OR predictions", the engine will first list all files that contain both words. Then, below it will list all files that have either term. In other words, it gives a preference for results that have both terms but if not, it will list results that have only one of the terms.
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Ability to use both "AND" and "OR".

Post by ChrisGreaves »

HungerFreeze wrote: Mon May 29, 2023 1:53 pmFor example, if you search for "movies OR predictions", the engine will first list all files that contain both words. Then, below it will list all files that have either term. In other words, it gives a preference for results that have both terms but if not, it will list results that have only one of the terms.
Helo HungerFreeze .
I was moved to experiment with compound search strings (attached zip file). I used "movies" and "music" as my examples would not work with "movies" and "predictions".
I was able to demonstrate Boolean Alegbra as a way to assemble sets such as you request with "the engine will first list all files that contain both words. Then, below it will list all files that have either term", but the listing appears to be in a haphazard sequence.

Example (12) A compound search string that delivers the set of objects “movies AND music” and then goes on to deliver objects that contain “movies” and then goes on the add in objects that deliver “music” returns the correct number of objects, but the sorting appears to be haphazard (but with no duplicate results!), and View, Sort, Advanced appears to offer no way to use the structure of the compound search logic to sequence the Result List.
<movies music>|movies|music
CompoundSearches_06.png
CompoundSearches_06.png (46.3 KiB) Viewed 6155 times
Cheers, Chris
Attachments
CompoundSearchStrings.zip
(1.03 MiB) Downloaded 251 times
HungerFreeze
Posts: 44
Joined: Tue May 02, 2017 4:04 pm

Re: Ability to use both "AND" and "OR".

Post by HungerFreeze »

ChrisGreaves wrote: Mon May 29, 2023 3:09 pm
HungerFreeze wrote: Mon May 29, 2023 1:53 pmFor example, if you search for "movies OR predictions", the engine will first list all files that contain both words. Then, below it will list all files that have either term. In other words, it gives a preference for results that have both terms but if not, it will list results that have only one of the terms.
Chris,

Thanks for your suggestions. I was hoping there would be a quick way to do this since I literally use this search engine multiple times throughout the day. So, it would be kinda' cool to figure out an easy, quick way to do it.

But, I'll definitely tinker with what you recommended. Thanks!
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Ability to use both "AND" and "OR".

Post by ChrisGreaves »

HungerFreeze wrote: Mon May 29, 2023 10:47 pmBut, I'll definitely tinker with what you recommended. Thanks!
You're welcome.👌
Note 1: I am a novice, so you might want to test my work carefully.
Note 2: I believe I am correct with "View, Sort, Advanced appears to offer no way to use the structure of the compound search logic to sequence the Result List.", but the developer tends to release updates/fixes/enhancements when my back is turned :D so there may well be a Sort that I haven't yet met.
Please post back here when you learn something!
Cheers, Chris
Post Reply