content: with no parameter redundant

Discussion related to "Everything" 1.5 Alpha.
Post Reply
meteorquake
Posts: 546
Joined: Thu Dec 15, 2016 9:44 pm

content: with no parameter redundant

Post by meteorquake »

A "sort of" bug I think.
when you type content: it starts searching through contents for a zero-length string, which is a redundant action, I think content: should be ignored if its parameter has no length, and only start looking when there is a parameter.
I also suspect it doesn't need to check content: until you stop typing (at least 0.5 secs (or perhaps a little more) elapsing since last edit-keystroke).
d
horst.epp
Posts: 1493
Joined: Fri Apr 04, 2014 3:24 pm

Re: content: with no parameter redundant

Post by horst.epp »

meteorquake wrote: Tue Mar 04, 2025 6:12 pm A "sort of" bug I think.
when you type content: it starts searching through contents for a zero-length string, which is a redundant action, I think content: should be ignored if its parameter has no length, and only start looking when there is a parameter.
I also suspect it doesn't need to check content: until you stop typing (at least 0.5 secs (or perhaps a little more) elapsing since last edit-keystroke).
d
I disagree
Content: without parameter is useful as it shows me the full results of my indexed content.
I can then add parameters to reduce the list.
NotNull
Posts: 5769
Joined: Wed May 24, 2017 9:22 pm

Re: content: with no parameter redundant

Post by NotNull »

It is in line with <property>: functions, like version: or height:
If the value is non-empty, that file will be listed.
(1.4 behaved diffrently btw)

Try for example to create 2 .txt files. One with "hello world" content, the other zero bytes in size.
c:\testfolder content:
will only show the first one. (untested)


Moved to the Everything 1.5 forum.
meteorquake
Posts: 546
Joined: Thu Dec 15, 2016 9:44 pm

Re: content: with no parameter redundant

Post by meteorquake »

So I'll suggest a rephrase of the matter for consideration...

content: (no value) where (presumably) content is not indexed shouldn't need to do a slow content scan (at least under an ordinary interpretation of a file composed of just space being treated as having content which appears to be the case) but should be treated as a synonym of size:>0 which is instant (with non-text-type file extensions such as .doc perhaps doing a content check).

if the content being searched for is greater in length than the file size it can also be skipped without reading the file (not sure what it currently does).

d
Post Reply