How to use a filter with everything sdk

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
yemanqitipo
Posts: 11
Joined: Sat Dec 17, 2022 9:02 am

How to use a filter with everything sdk

Post by yemanqitipo »

Hi, everyone.
I notice that there is an submenu named "Organize filters" in the everything gui, and also I can check one of file category in the memu "Search".

I had a quick look of the everything api list, but found nothing.
How I can use a filter with everything sdk.
Two example:
1. search the file list which category are Document ?
2. search the file list which category are NOT folder ?
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to use a filter with everything sdk

Post by void »

You cannot access filters with Everything 1.4 and the SDK.

Have a look at the search for each filter and apply that search instead.



For example, include the following in your search:
1. search the file list which category are Document ?

Code: Select all

ext:c;cc;chm;cpp;cs;css;csv;cxx;doc;docm;docx;dot;dotm;dotx;epub;h;hpp;htm;html;hxx;ini;java;js;json;lua;md;mht;mhtml;mobi;odp;ods;odt;pdf;php;potx;potm;ppam;ppsm;ppsx;pps;ppt;pptm;pptx;pub;py;rtf;sldm;sldx;thmx;txt;vsd;wpd;wps;wri;xlam;xls;xlsb;xlsm;xlsx;xltm;xltx;xml;vb

2. search the file list which category are NOT folder ?
file:


-or-

!folder:




Everything 1.5 will support filters from the SDK.

For example, include the following in your search:

filter:document
filter:"My custom filter name"
pic:
doc:
zip:

filter:
yemanqitipo
Posts: 11
Joined: Sat Dec 17, 2022 9:02 am

Re: How to use a filter with everything sdk

Post by yemanqitipo »

void wrote: Mon Feb 13, 2023 4:55 am You cannot access filters with Everything 1.4 and the SDK.

Have a look at the search for each filter and apply that search instead.



For example, include the following in your search:
1. search the file list which category are Document ?

Code: Select all

ext:c;cc;chm;cpp;cs;css;csv;cxx;doc;docm;docx;dot;dotm;dotx;epub;h;hpp;htm;html;hxx;ini;java;js;json;lua;md;mht;mhtml;mobi;odp;ods;odt;pdf;php;potx;potm;ppam;ppsm;ppsx;pps;ppt;pptm;pptx;pub;py;rtf;sldm;sldx;thmx;txt;vsd;wpd;wps;wri;xlam;xls;xlsb;xlsm;xlsx;xltm;xltx;xml;vb

2. search the file list which category are NOT folder ?
file:


-or-

!folder:




Everything 1.5 will support filters from the SDK.

For example, include the following in your search:

filter:document
filter:"My custom filter name"
pic:
doc:
zip:

filter:
Thank you for the reply!
Do you mean Everything_SetSearch("my_search_string !folder:") ?
if Everything_SetRegex(true) , is there a conflict ?
I thought when calling Everything_SetSearch(LPCTSTR lpString) , everything treats param lpString as a whole string , am I wrong?
Or everything will parse the param lpString under the hood?
Last edited by yemanqitipo on Mon Feb 13, 2023 6:01 am, edited 1 time in total.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to use a filter with everything sdk

Post by void »

Do you mean Everything_SetSearch("my_search_string !folder:") ?
Yes use a space for AND.
I recommend doing your filter search first, then add any user supplied search strings:

Everything_SetSearch("!folder: <user-search-string>")


if Everything_SetRegex(true) , is there a conflict ?
Yes, leave Everything_SetRegex disabled, and please try the following search:

Everything_SetSearch("!folder: regex:\"<user-search-string>\"")

For example:

Everything_SetSearch("!folder: regex:\"^foo bar\"")

Remove any double quotes from the user input.
yemanqitipo
Posts: 11
Joined: Sat Dec 17, 2022 9:02 am

Re: How to use a filter with everything sdk

Post by yemanqitipo »

Got it. Thank you very much!
Post Reply