Size function

Found a bug in "Everything"? report it here
Post Reply
nagan
Posts: 302
Joined: Thu Apr 18, 2013 11:44 am

Size function

Post by nagan »

x64
whereas dc,dm return exact values for say dc:01/06/2011 and dc:01/06/2011-01/08/2012 size does not for size:5mb and size:2mb-5mb. Both return files which are less than 1mb of the lower query value. But on the higher side seems ok.
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: Size function

Post by void »

Thanks for the bug report.

The ceiling of the size with the specified suffix is used for comparisons.

For example:
size:0mb will match files with 0 bytes.
size:1mb will match files with 1 byte to 1048576 bytes.
size:2mb will match files with 1048577 bytes to 2097152 bytes.
size:5mb will match files with 4194305 bytes to 5242880 bytes.

When using the size function with a range, the lower and higher ends are both inclusive.
2mb-5mb is actually:
1048577 bytes - 5242880 bytes

I will review this rounding up effect.
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: Size function

Post by void »

I have changed this so 1mb means exactly 1mb, I will trial this in a beta update soon.
nagan
Posts: 302
Joined: Thu Apr 18, 2013 11:44 am

Re: Size function

Post by nagan »

How about size:~5mb for nearer up and down results which could be useful too.
nagan
Posts: 302
Joined: Thu Apr 18, 2013 11:44 am

Re: Size function

Post by nagan »

x86
A minor one. Size band 1b-8b , 1b-5kb does not work. Seems like only for bytes at the range start ....
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: Size function

Post by void »

There is no b suffix. if you don't specify a suffix, the size is in bytes.

Please try:

Code: Select all

size:1-5kb
I will consider adding the b suffix.
nagan
Posts: 302
Joined: Thu Apr 18, 2013 11:44 am

Re: Size function

Post by nagan »

Ok. Thanks for the clarification. It works fine.
I observe a greater usage of CPU while querying (and it also takes care of the sort) , could that be made for the Sorts too , which operate at little lesser usage , if possible by user discretion.
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: Size function

Post by void »

There is the ini option: max_threads
Try setting this to one less than the number of CPUs in your system.

For example, if you have 4 cpus, set max_threads=3
This will leave one cpu free for other things.

I will consider the option to specify the sort and query priority.
Post Reply