Space within a path works, but WHY?!!???

Discussion related to "Everything" 1.5 Alpha.
Post Reply
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Space within a path works, but WHY?!!???

Post by ChrisGreaves »

Everything 1.5a is working, but my brain is not.
Two relevant topics might be How to have a space in a path for file-exists: and Space character when searching a files name and path
Lexical_02.png
Lexical_02.png (86.35 KiB) Viewed 935 times
I am thinking about the lexical atoms of Everything and suddenly realize that Everything is smart enough to recognize the string "T:\Greaves\Training\Everything\Tutorial\Section 02\" and DOES NOT treat the intervening space in "Section 02" as the conjunction "AND". The screenshot above shows that all documents in my second section folder are displayed. Which is what I want :clapping:

How does Everything do this?

Based on my current knowledge, had I been challenged, I would have broken my search-string into three components.
T:\Greaves\Training\Everything\Tutorial\Section

and
02\

and
ext:doc


The only thing that comes to my mind is that
02\
occurs in 39,200 objects on my system and that
T:\Greaves\Training\Everything\Tutorial\Section
occurs in 109 objects, and that the intersection of these two sets of objects happen to be only 10 objects-which-happen-to-be folders.

Perhaps my original thought is close to the correct analysis, and Everything DOES treat the intervening space in "Section 02" as the conjunction "AND".

I do NOT want to hear in response that Everything is just a simple mail-forwarding package and that Void analyzes answers every search request personally :twisted: :lol:

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

Re: Space within a path works, but WHY?!!???

Post by void »

Everything is smart enough to recognize the string "T:\Greaves\Training\Everything\Tutorial\Section 02\"
Unfortunately, Everything is not smart.
The space will still be interpreted as AND.

The trailing \ in 02\ will force Everything to match the full path and name.
This will give the expected results.
However, it may also give undesirable results, such as:
T:\Greaves\Training\Everything\Tutorial\Section 202



Without using quotes, the search fails when there is multiple spaces and NO \ next to a word.
For example:
C:\Program Files (x86)\

which Everything interprets as:
C:\Program AND Files AND (x86)\

C:\Program and (x86)\ will match the full path and name because of the included \
Files on the other hand will only match the name part.


I do NOT want to hear in response that Everything is just a simple mail-forwarding package and that Void analyzes answers every search request personally
I know you say this jokingly.
However, I want to make it very clear, I don't know what users are searching for.
voidtools does not collect any user data.
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Space within a path works, but WHY?!!???

Post by ChrisGreaves »

ChrisGreaves wrote: Mon May 01, 2023 11:17 am How does Everything do this?
I might have answered my own question by mistake:-
Lexical_03.png
Lexical_03.png (70.55 KiB) Viewed 924 times
I decided to plod on, and my next lexical atom to be described was the NOT symbol, also known as the exclamation mark or (UK) "Shriek"
So now I am looking for all objects that satisfy the constraints "T:\Greaves\Training\Everything\Tutorial\Section" AND "02\" (and please note that here I have omitted the <space> symbol) but that do NOT end in the extension DOC.
and there are NO folder paths that consist of only "T:\Greaves\Training\Everything\Tutorial\Section"
and there are NO folder paths that consist of only "02"
But there ARE folders that hold both "T:\Greaves\Training\Everything\Tutorial\Section" AND "02" in their names.
Cheers, Chris
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Space within a path works, but WHY?!!???

Post by ChrisGreaves »

void wrote: Mon May 01, 2023 11:28 am
Everything is smart enough to recognize the string "T:\Greaves\Training\Everything\Tutorial\Section 02\"
Unfortunately, Everything is not smart.
The space will still be interpreted as AND.
Thank you Void. Enclosed in quotes, and a string strips a space symbol from its use as AND. I think I get that.
But I was (probably for a bad reason) not enclosing in quotes. I suspect that if a weird object had turned up in the result List I would have remembered to use quotes.
The trailing \ in 02\ will force Everything to match the full path and name.
Funnily enough this was scheduled in my next document "Ignore Punctuation and Ignore White Space.doc" as shown in my screenshot in the first post!
Without using quotes, the search fails when there is multiple spaces. C:\Program Files (x86)\
Right. This too I think I would have picked up when strange results popped up.

However, I want to make it very clear, I don't know what users are searching for.
voidtools does not collect any user data.
Absolutely! I should have made that point. I have complete confidence in your and your program's integrity, and thank you for stressing that.
Cheers, Chris
Post Reply