Preset / favor Windows Search Index

Discussion related to "Everything" 1.5 Alpha.
Post Reply
obz
Posts: 6
Joined: Tue Jan 04, 2022 2:27 pm

Preset / favor Windows Search Index

Post by obz »

Hi,

is there a setting to use the Windows Search index always, without using the si: prefix?

Oliver
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Preset / favor Windows Search Index

Post by raccoon »

Can you please elaborate?
obz
Posts: 6
Joined: Tue Jan 04, 2022 2:27 pm

Re: Preset / favor Windows Search Index

Post by obz »

I would like to work mainly / by default with the Windows Search Index, as I can do since 1.5.0.1258a by using the si: / systemindex: prefix.

Windows Search works really good, but Microsoft crippled the user interface with 1909 aka 19H2 by removing instant results, syntax highlighting, date range search etc...
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Preset / favor Windows Search Index

Post by raccoon »

See @voids post here about Creating a Filter that uses the #replace-terms: preprocessor command.

#replaceterms:#(:search:#):,#(:si:#term:#):
Last edited by void on Tue Jan 30, 2024 10:21 am, edited 1 time in total.
Reason: fixed link
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preset / favor Windows Search Index

Post by void »

The #replace-terms: preprocessor command might be overkill here.
(si: generally searches filenames already)


Please try a System Index filter:
  • In Everything, from the Search menu, click Add to filters....
  • Set the Name to:
    System Index
  • Change the Search to:
    si:<search:>
  • Change the Macro to:
    simacro<search>
  • Click OK.
Filters can be activated from the Search menu, Filter bar (View -> Filters), right clicking the status bar, filter macro or filter keyboard shortcut.



Alternatively, for more control, please try the #replace-terms: preprocessor command with your Filename or System Index filter:
  • In Everything, from the Search menu, click Add to filters....
  • Set the Name to:
    Filename or System Index
  • Change the Search to:
    #replaceterms:#(:search:#):,#(:<#term:|si:#term:>#):
  • Change the Macro to:
    filenameorsi<search>
  • Click OK.
obz
Posts: 6
Joined: Tue Jan 04, 2022 2:27 pm

Re: Preset / favor Windows Search Index

Post by obz »

void wrote: Wed Jan 05, 2022 12:21 am Please try a System Index filter:
[...]
Alternatively, for more control, please try the #replace-terms:
neither of both works here (using 1.5.0.1294a).

I have to admit that I can't follow the syntax of the example. Is there a comprehensive explanation of all the escape, grouping and expansion rules like in "#(:" etc?

I also didn't find the documentation for the "simacro<search>" syntax yet I thing I got it:

After some experimenting using the debug console, I found that si:<search:> outputs < and > in the search term, for example, 'foo' expands to 'si:<foo>' instead of 'si:foo'. So this can't work.

With 'si:search:' in the filte, 'foo' expands to 'si:foo' as wanted.

But 'foo bar' expands to 'si:foo bar'. In Windows Search, 'foo bar' would serach for both 'foo' and 'bar' in content and name.

I don't understand the replace-terms example and can't reproduce it. The debug console doesn't seem to show the output of the Preprocessor, correct?

Oliver
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preset / favor Windows Search Index

Post by void »

Thank you for your reply Oliver,
I have to admit that I can't follow the syntax of the example. Is there a comprehensive explanation of all the escape, grouping and expansion rules like in "#(:" etc?
Basic Everything syntax is:
space = AND
| = OR
! = NOT
< > = Grouping
" " = Search for an exact phrase.

Preprocessor Syntax


si:<foo>
Everything will use group expansion here.

si:<foo> will expand to si:foo
si:<abc 123> will expand to si:abc si:123

Please make sure your filter search is:
si:<search:>



#replace-terms: is currently broken.
Expanded text is shown in the debug console, usually as expanded: <expaned-search>
Expansion appears to be breaking at the |
I am working on a fix.
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preset / favor Windows Search Index

Post by void »

There's currently a bug with Everything not parsing the entire new term.
This will be fixed in the next update.

Please use double quotes to parse the entire new term:
  • In Everything, from the Search menu, click Add to filters....
  • Set the Name to:
    Filename or System Index
  • Change the Search to:
    #replaceterms:#(:search:#):,#(:"<#term:|si:#term:>"#):
    Note: the addition of double quotes (")
  • Change the Macro to:
    filenameorsi<search>
  • Click OK.
obz
Posts: 6
Joined: Tue Jan 04, 2022 2:27 pm

Re: Preset / favor Windows Search Index

Post by obz »

void wrote: Thu Jan 06, 2022 1:10 am Everything will use group expansion here.

si:<foo> will expand to si:foo
si:<abc 123> will expand to si:abc si:123
thanks for the link.
void wrote: Thu Jan 06, 2022 1:10 am Expanded text is shown in the debug console, usually as expanded: <expaned-search>
This was helpful. Group expansion doesn't seem to work with space as delimiter:

Code: Select all

search 'foo<bar|baz>' filter '' sort 5 ascending 0
group expand foo<bar|baz> => <foobar | foobaz>
expanded: <foobar | foobaz>
parse flags 00000000 type 20c01100
TERM foobar
parse flags 00000000 type 20c01100
TERM foobaz
but

Code: Select all

search 'foo<bar baz>' filter '' sort 5 ascending 0
parse flags 00000000 type 20c01100
TERM foo<bar
parse flags 00000000 type 20c01100
TERM baz>
void wrote: Thu Jan 06, 2022 1:10 am Please make sure your filter search is:
si:<search:>
This doesn't work even with a single phrase: Entering 'foobar' results then in

Code: Select all

search 'si:<foobar>' filter '' sort 5 ascending 0
TERM foobar
but 'si:<foobar>' doesn't return anything.

BTW: I see that it might be better to pass the whole entry to Windows Search, which seems to be simple:

'si:"search:"'

The downside is that I can't combine it with other Everything syntax, but the advantage is that I can use the complete Windows Search syntax.

Oliver
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preset / favor Windows Search Index

Post by void »

Thanks for your reply Oliver,

I understand the issue now, Everything has flagged the si: search function with sub-expression support.
However, sub-expressions are not supported and the < > sub-expression is completely ignored.

Functions that do not support sub-expressions use group expansion instead.
Ideally, this is what si: should do. (and also with support for spaces)

This will be fixed in the next alpha update so you can use the full Everything syntax, eg: si:<abc 123 foo|bar !not-this-value>


For now, si:"search:" should do the trick without support for the Everything syntax.
obz
Posts: 6
Joined: Tue Jan 04, 2022 2:27 pm

Re: Preset / favor Windows Search Index

Post by obz »

void wrote: Thu Jan 06, 2022 10:52 pm For now, si:"search:" should do the trick without support for the Everything syntax.
this fulfills my demand of a Windows Search front-end with "search as you type" ("instant") results.

As I wrote in our initial contact 2021-07-04 (different e-mail address), I find Windows Search to be a such great thing and I depend on it all the day (before Windows 7, i used Copernic).

I still don't understand why so few users knew or appreciated it.

And it's an incredible pity that Microsoft has hidden and crippled Windows Search more and more over the years.

The assignment of Win-F (is MS kidding, who the f*** needs a hotkey for the feedback hub?) could be undone easily, but the loss of instant results in version 1909/19H2 was a show stopper.

I usually retrieve documents from my huge data collection by opening a search prompt and starting to type until the list is short enough, therefore "instant results" are essential.

Another nice feature of the old Windows Search frontend was the date picker, easily allowing to select a date range. And the syntax coloring.

Oliver

P.S.: Initially, I used the Feedback Hub to complain about the Win-F hotkey. However, that apparently didn't help.
void
Developer
Posts: 16446
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preset / favor Windows Search Index

Post by void »

Everything 1.5.0.1295a fixes an issue with expanding a si:<> group.

The si: search function is no longer flagged as having sub-expression support.
Everything will now use group expansion for si:<>.
Everything will also allow spaces in the group expansion for si:.

For example:
si:<abc 123 foo|bar !not-this-value>

expands to:
<si:abc si:123 si:foo|si:bar !si:not-this-value>



Filters using the following search should now work as expected:
si:<search:>



Everything 1.5.0.1295a also fixes an issue with parsing the term in #replace-terms:.

The following filter search should now work as expected:
#replaceterms:#(:search:#):,#(:<#term:|si:#term:>#):
Post Reply