[solved]Content search does not work in the filter

General discussion related to "Everything".
Post Reply
telanx
Posts: 22
Joined: Sat Jan 25, 2020 12:51 pm

[solved]Content search does not work in the filter

Post by telanx » Thu Jul 23, 2020 8:57 am

I built a filter like this:
ext:txt;md;html;htm;ahk;ini;py;cmd;bat;ps1;chm; C:\Users\|D:\ !"\.vscode" !"Vim\" !"RECYCLE.BIN" utf8content:
Results:No files containing keywords were found.

or this, and then type "utf8content:keyword" in the search:
ext:txt;md;html;htm;ahk;ini;py;cmd;bat;ps1;chm; C:\Users\|D:\ !"\.vscode" !"Vim\" !"RECYCLE.BIN"
Result: Program will search all files, ignoring specified path parameters.

Now I paste content of the first filter into everything input through quick hot-string function of IME to correctly find the file containing keyword. I hope es can directly support such filter search. That would be great. :P
Last edited by telanx on Thu Jul 23, 2020 11:26 am, edited 1 time in total.

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

Re: Content search does not work in the filter

Post by NotNull » Thu Jul 23, 2020 10:11 am

telanx wrote:
Thu Jul 23, 2020 8:57 am
I hope es can directly support such filter search. That would be great. :P
Assuming "es" means Everything Search and not the commandline tool ES.exe :

That is possible. Just add a placeholder variable to your filter query.

Code: Select all

Search = ext:txt;md;html;htm;ahk;ini;py;cmd;bat;ps1;chm; C:\Users\|D:\ !"\.vscode" !"Vim\" !"RECYCLE.BIN" utf8content:myquery:

Macro = code<myquery>
("myquery" could be (almost) any text you like; I often use %1 )


Now you can enable your filter and search for "my text"
OR: enter the query code:"my text"

telanx
Posts: 22
Joined: Sat Jan 25, 2020 12:51 pm

Re: Content search does not work in the filter

Post by telanx » Thu Jul 23, 2020 11:26 am

NotNull wrote:
Thu Jul 23, 2020 10:11 am
telanx wrote:
Thu Jul 23, 2020 8:57 am
I hope es can directly support such filter search. That would be great. :P
Assuming "es" means Everything Search and not the commandline tool ES.exe :

That is possible. Just add a placeholder variable to your filter query.

Code: Select all

Search = ext:txt;md;html;htm;ahk;ini;py;cmd;bat;ps1;chm; C:\Users\|D:\ !"\.vscode" !"Vim\" !"RECYCLE.BIN" utf8content:myquery:

Macro = code<myquery>
("myquery" could be (almost) any text you like; I often use %1 )


Now you can enable your filter and search for "my text"
OR: enter the query code:"my text"
Yes! That's what I mean!!! I didn't expect this kind of syntax. :shock:
Thank you so much for your explanation! :D :mrgreen:

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

Re: [solved]Content search does not work in the filter

Post by NotNull » Thu Jul 23, 2020 11:46 am

:thumbsup: :)

telanx
Posts: 22
Joined: Sat Jan 25, 2020 12:51 pm

Re: [solved]Content search does not work in the filter

Post by telanx » Thu Jul 23, 2020 1:48 pm

NotNull wrote:
Thu Jul 23, 2020 11:46 am
:thumbsup: :)
Excuse me, another question.
Can I use multiple macro variables?

For example:
filter -- ext:%1: utf8content:%2:
macro -- code<%1> <%2>
search input:'txt; keyword'

but it didn't work. Is there a multi-variable usage? :cry:

telanx
Posts: 22
Joined: Sat Jan 25, 2020 12:51 pm

Re: [solved]Content search does not work in the filter

Post by telanx » Thu Jul 23, 2020 3:12 pm

I think I found the answer.
Only one variable can be used in a filter, and the other filters in this filter must use the macro name. A variable can be passed to multiple locations in the search value. :geek:

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

Re: [solved]Content search does not work in the filter

Post by NotNull » Thu Jul 23, 2020 3:43 pm

telanx wrote:
Thu Jul 23, 2020 1:48 pm
Can I use multiple macro variables?
I was asking myself this question too, some time ago.
After research and experimenting, it turned out that Everything will not expand the %2.

Behind the scenes, your query code:pdf foo would be executed as:

Code: Select all

nofiltercase:nofilterpath:nofilterwholeword:nofilterdiacritics:nofilterregex:<ext:pdf  utf8content:%2: > foo

TLDR: No.

telanx
Posts: 22
Joined: Sat Jan 25, 2020 12:51 pm

Re: [solved]Content search does not work in the filter

Post by telanx » Thu Jul 23, 2020 4:58 pm

NotNull wrote:
Thu Jul 23, 2020 3:43 pm
telanx wrote:
Thu Jul 23, 2020 1:48 pm
Can I use multiple macro variables?
I was asking myself this question too, some time ago.
After research and experimenting, it turned out that Everything will not expand the %2.

Behind the scenes, your query code:pdf foo would be executed as:

Code: Select all

nofiltercase:nofilterpath:nofilterwholeword:nofilterdiacritics:nofilterregex:<ext:pdf  utf8content:%2: > foo

TLDR: No.
Anyway, Thanks for your thoughts, good luck ;)

Post Reply