Syntax order

Found a bug in "Everything"? report it here
Post Reply
w64bit
Posts: 58
Joined: Wed Jan 09, 2013 9:06 am

Syntax order

Post by w64bit » Thu Feb 28, 2019 4:40 pm

Using 935, I tried to search for folders with:
1. folder:d: (all OK)
2. d:folder: (not OK)
Is there any syntax order mandatory?
If possible I think that the program should be changed so it should be none.
Thank you

horst.epp
Posts: 184
Joined: Fri Apr 04, 2014 3:24 pm

Re: Syntax order

Post by horst.epp » Thu Feb 28, 2019 4:54 pm

Sorry that is a confuse idea.
Your idea will never work and of course there is a sequence of keyword and parameter and not vice versa

w64bit
Posts: 58
Joined: Wed Jan 09, 2013 9:06 am

Re: Syntax order

Post by w64bit » Thu Feb 28, 2019 5:39 pm

So, why:
folder:d: it's working
d:folder: it's NOT working
but
d: folder: it's working

horst.epp
Posts: 184
Joined: Fri Apr 04, 2014 3:24 pm

Re: Syntax order

Post by horst.epp » Thu Feb 28, 2019 6:54 pm

w64bit wrote:
Thu Feb 28, 2019 5:39 pm
So, why:
folder:d: it's working
d:folder: it's NOT working
but
d: folder: it's working
The space after the d: let Everything first search all entries on drive D: and then it restricts the results to folders:
The construct d:folder: tries to search for a keyword d: followed by an parameter.

w64bit
Posts: 58
Joined: Wed Jan 09, 2013 9:06 am

Re: Syntax order

Post by w64bit » Thu Feb 28, 2019 7:01 pm

In this case, folder:d: should not find anything because a space should be necessary.

NotNull
Posts: 1480
Joined: Wed May 24, 2017 9:22 pm

Re: Syntax order

Post by NotNull » Thu Feb 28, 2019 7:57 pm

You can use a space and then
folder: d:
and
d: folder:
will give you the same results.

If you don't us a space, te function will work as key:value, like size:1MB. Here size: is the function and 1MB is the value.

So, folder:d: has d: as the value for the function. There is no function d: and that's why d:folder: doesn't work as expected.

void
Site Admin
Posts: 4904
Joined: Fri Oct 16, 2009 11:31 pm

Re: Syntax order

Post by void » Thu Feb 28, 2019 11:58 pm

Everything breaks the search down into "search terms".
For example, the search
abc 123
is two search terms:
abc
AND
123
.

folder: is a search modifier to flag the search term as folders only.
d: is a normal text search term.

Search modifiers must appear before a search term.

Think of the following search
folder: d:
as:
folder:* d:
which basically means every folder AND d:
In this case, folder:d: should not find anything because a space should be necessary.
Think of folder: as setting a flag for the following search term: d:, eg: folders only that are on your d:
Similar to case: if you want to search for ABC, but in uppercase only, you can use the case: search modifier, eg: case:ABC

Things get ugly with search functions that don't take a parameter, eg: root:c which gets evaluated as root: AND c

d:folder: is also a valid filename.
It refers to a folder called "folder" in the current directory of D: with the unnamed data stream.

Post Reply