[Solved] Syntax order

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

[Solved] Syntax order

Post by w64bit »

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
Last edited by w64bit on Tue Mar 16, 2021 11:34 am, edited 1 time in total.
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Syntax order

Post by horst.epp »

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: 253
Joined: Wed Jan 09, 2013 9:06 am

Re: Syntax order

Post by w64bit »

So, why:
folder:d: it's working
d:folder: it's NOT working
but
d: folder: it's working
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Syntax order

Post by horst.epp »

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: 253
Joined: Wed Jan 09, 2013 9:06 am

Re: Syntax order

Post by w64bit »

In this case, folder:d: should not find anything because a space should be necessary.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Syntax order

Post by NotNull »

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
Developer
Posts: 16770
Joined: Fri Oct 16, 2009 11:31 pm

Re: Syntax order

Post by void »

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