ES: Is ES.EXE notting (or void-ing) NOT queries ?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

ES: Is ES.EXE notting (or void-ing) NOT queries ?

Post by therube »

ES: Is ES.EXE notting (or void-ing) NOT queries ?

ES.EX2 -instance 15 -highlight ww:NOT


returns zilch.

I can NOW, I can NON, I can NOA, I can NOV.
But, I can not NOT ?

I can,
ES.EX2 -instance 15 -highlight not

or
ES.EX2 -instance 15 regex:\bNOT\b

to case insensitively find 'not', but simply NOT does not NOT?

Is NOT a special function to ES?
Ah, it's not listed in ES -?, but it is in Everything -?.
Now why did I NOT think of that before?
(Didn't catch it there either, but maybe I did NOT look carefully.)

I can
\NOT
to case sensitively find filenames that start with NOT,
but still I can NOT find NOT within a filename?

ES.EX2 -instance 15 ww:case:\NOT nopath:



(Kind of thinking that somewhere is/was mention of things like NOT AND and similar,
maybe treating it as a literal, but I'm NOT remembering where?)

OK, so -case will find NOW in a filename, but still NOT NOT?
ES.EX2 -instance 15 -highlight ww:NOT -case



QUOTES.
You can find my diatribes about QUOTES elsewhere in these parts.
But, QUOTES work.


ES.EX2 -instance 15 -highlight case:ww:"NOT"



Now, why did I NOT think of that a couple days ago, NOW!

And what clued me in to try QUOTES:
Use double quotes to escape spaces and switches.
(With that, I thought, why NOT!)


Whew.
(Now all I have to do is to remember that, or NOT.
And remind me to never search for NOT again ;-).)


(And scratches head again, in thinking that AND would likewise be affected,
but it is NOT. Either 'AND' or "AND" work.)


(And look at that. My actual wanted search is NOW returning wanted results,
NOT unwanted ones, heh.)



OK, now explain nopath:?
nopath: needs to be attached to the <search>?
As in
nopath:case:ww:"NOT"

& NOT
case:ww:"NOT" nopath:



And while we're here, how do you nopath: a NOT?
/red cats/cat.jpg
/blue cats/dog.jpg
/cats & dogs/red cat.jpg

ES.EX2 cat nopath:!red


I can nopath:cat, but can't nopath: the !red (to get wanted results) ?
I can work around it, to an extent, by NOT-ing a string in the path,
but that might not always be workable.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES: Is ES.EXE notting (or void-ing) NOT queries ?

Post by void »

Have you enabled literal operators under Everything GUI -> Tools -> Options -> Search -> Allow literal operators?

Literal operators:
NOT
AND
OR

Literal operators must be uppercase.

-If literal operators are enabled, NOT will be the same as the NOT operator (!)

NOT on its own will match nothing.



I usually don't recommend enabling literal operators as it can conflict with real filenames.

The following operators exist:
not:
and:
or:

..and for others, the basic Everything operators:
! = NOT
space = AND
| = OR
" " = escape operators


nopath: needs to be attached to the <search>?
nopath: is a search modifier.
Search modifiers are applied to search terms. (it must be attached to your search)
nopath: == disable path+name matching and just match name.
You can enable the nopath: search modifier globally with ?nopath: at the start of your search.
?nopath: case:ww:"NOT"


-no-p is an ES command line option to disable path+name matching:

case:ww:"NOT" -no-p


(-no-match-path is missing... I will add this)

no-path:
-no-p


And while we're here, how do you nopath: a NOT?
cat nopath:!red


I get the following expected matches:

Code: Select all

C:\TEST\PATH\blue cats\dog.jpg
C:\TEST\PATH\red cats\cat.jpg
C:\TEST\PATH\cats & dogs\
C:\TEST\PATH\blue cats\


cat nopath:!red -no-p


I get the following expected matches:

Code: Select all

C:\TEST\PATH\red cats\cat.jpg
C:\TEST\PATH\cats & dogs\
C:\TEST\PATH\blue cats\
What results are you expecting?
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: ES: Is ES.EXE notting (or void-ing) NOT queries ?

Post by therube »

Have you enabled literal operators under Everything GUI -> Tools -> Options -> Search -> Allow literal operators?
I'm thinking I must have... ages ago, I'm guessing? (And then since carried forward.)
No idea why, unless maybe at some point it was defaulted (to enabled, or if I'd been testing something & forgot to revert it)?
therube
Posts: 5711
Joined: Thu Sep 03, 2009 6:48 pm

Re: ES: Is ES.EXE notting (or void-ing) NOT queries ?

Post by therube »

And while we're here...


ES.EXE: -dash+word needs QUOTES


you mean to tell me that in all these years i've never searched for a -dash+word?
so any -dash+word is treated as a switch, so to search for -dash+word, you need to QUOTE it

c:/out/-one cat -two cat red cat blue cat.jpg

red -two


it needs QUOTES

red "-two"



and even though / can also start a switch
red /one
is not treated as a switch
rather, /one (path or file prefix part) AND red
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES: Is ES.EXE notting (or void-ing) NOT queries ?

Post by void »

ES treats
-
--
and
/
prefixes as a command line switches.

/ will silently fail if there's no matching switch, so you can search for
/downloads
without breaking too much.

The next ES update will have support for
--
to disable command line switch processing.
eg:
es -- red -two


The next ES update will also have support for
-s*
to treat the rest of the command line as a literal search.
eg:
es -s* red -two

(-s* doesn't process double quotes, where as -- does)

Otherwise, you will need to use double quotes to escape searches starting with -
Post Reply