reorder: search modifier

Discussion related to "Everything" 1.5 Alpha.
Post Reply
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

reorder: search modifier

Post by NotNull »

Search modifiers can be disabled by prefixing it with: no
[..]

Prefix a search modifier with :: to enable it globally.
For example, to enable match case for the rest of the search:
::case: FOO BAR
What should ::noreorder: or ::no-reorder: do?
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: reorder: search modifier

Post by void »

reorder
no-reorder

reorder: is enabled by default.

reordering executes the fastest search functions first and the slowest ones last:

Searching for:
content:"foo bar" *.docx

is automatically reorder from left to right:
*.docx content:"foo bar"

*.docx will be executed first, content:"foo bar" last.



no-reorder disables search function reordering.
search functions are executed from left to right.

The noreorder: modifier exists to give the user full control over the execution order of search functions.
disabling reordering might be necessary with certain regex searches.

Everything will automatically disable reordering when:
you reference a regmatch0-9 with fileexists:/folderexists: (in the next alpha update)
use the expand: search modifier.
use child: and child-occurrence-count:
use column assignment, for example: col1:=LEN($regmatch1:)
compare regmatches, for example: regmatch1:==regmatch2:
use regmatch0-9: search function.
use a sibling: with $1-9:
use eval: search function, for example: eval:LEN($regmatch1:)>LEN($regmatch2:)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: reorder: search modifier

Post by NotNull »

Thanks for the explanation (btw: consider adding these exceptions to the modifier description).

What about the global search modifier ::noreorder: ?
::noreorder: content:"foo bar" *.docx
does not produce any results.
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: reorder: search modifier

Post by void »

The global prefix :: will work for all search modifiers in the next alpha update.
Only some had previously been supported.

For now, use noreorder: anywhere in the search.
reordering is done after the search is broken into terms.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: reorder: search modifier

Post by NotNull »

:thumbsup:
void wrote: Sat Jul 20, 2024 10:04 amFor now, ..
That was my "workaround" :)
Post Reply