Search query with two "size:"-parameters

Found a bug in "Everything"? report it here
Post Reply
Elbart
Posts: 33
Joined: Sun Jan 24, 2010 12:53 pm

Search query with two "size:"-parameters

Post by Elbart »

Hello.

First: Thank you for the new versions of Everything. Now the best program for search became even better. :D

Second: I was excited to read that you've added a search-parameter to limit the result to certain filesizes.
So I played around with it and discovered two bugs, using version 1.3.1.636b.

Queries like

Code: Select all

ext:mkv size:<3gb
or

Code: Select all

ext:mkv size:>2gb
are working fine.

Then I tried to search for .MKV-files larger than 2GiB and smaller than 3GiB with the following query

Code: Select all

ext:mkv size:>2gb size:<3gb
but the results-window was empty, which couldn't be the case.

BUG 1:
After some experimenting I found out that with two size:-parameters, the "smaller than"-operator has to be placed behind the number to get results, i.e.

Code: Select all

ext:mkv size:>2gb size:3gb<

Code: Select all

ext:mkv size:3gb< size:>2gb
BUG 2:
With the following queries

Code: Select all

ext:mkv size:<3gb size:2gb>

Code: Select all

ext:mkv size:2gb> size:<3gb
Everything was showing all mkv-files larger than 1GiB and smaller than 2GiB.

Following this, trying

Code: Select all

ext:mkv size:<1gb size:>1mb
leads to zero results, but

Code: Select all

ext:mkv size:<=1gb size:>1mb

Code: Select all

ext:mkv size:<2gb size:>1mb
and

Code: Select all

ext:mkv%20size:<1024mb size:>1mb
show the files between 1MiB and 1GiB.

EDIT:
Further observations:

Code: Select all

ext:mkv size:>>2gb size:<3gb
shows all MKVs from 0b up to 2GiB.

Code: Select all

ext:mkv size:>=2gb size:<3gb
shows all MKVs between 1 and 2GiB.

Code: Select all

ext:mkv size:>2gb size:<=3gb
shows all MKVs between 2 and 3GiB.

Code: Select all

ext:mkv size:>2048mb size:<3072mb
does the same.

Code: Select all

ext:mkv size:>2gb size:<3072mb
also works.

Code: Select all

ext:mkv size:>2048mb size:<=3gb
works too.

Code: Select all

ext:mkv size:>2048mb size:<3gb
shows nothing.
Last edited by Elbart on Mon Feb 25, 2013 3:44 pm, edited 1 time in total.
vsub
Posts: 479
Joined: Sat Nov 12, 2011 11:51 am

Re: Search query with two "size:"-parameters

Post by vsub »

Use range
ext:mkv size:2gb..3gb
ext:mkv size:2gb-3gb
Elbart
Posts: 33
Joined: Sun Jan 24, 2010 12:53 pm

Re: Search query with two "size:"-parameters

Post by Elbart »

vsub wrote:Use range
ext:mkv size:2gb..3gb
ext:mkv size:2gb-3gb
These operators have bugs, too:

Code: Select all

x   ext:mkv size:2048mb.3072mb
o   ext:mkv size:2048mb..3072mb
o   ext:mkv size:2048mb-3072mb

1-2 ext:mkv size:2gb.3072mb
1-3 ext:mkv size:2gb..3072mb
1-3 ext:mkv size:2gb-3072mb

x   ext:mkv size:2048mb.3gb
o   ext:mkv size:2048mb..3gb
o   ext:mkv size:2048mb-3gb

1-2 ext:mkv size:2gb.3gb
1-3 ext:mkv size:2gb..3gb
1-3 ext:mkv size:2gb-3gb

x   ext:mkv size:2097152kb.3gb
o   ext:mkv size:2097152kb..3gb
o   ext:mkv size:2097152kb-3gb

1-2 ext:mkv size:2gb.3145728kb
1-3 ext:mkv size:2gb..3145728kb
1-3 ext:mkv size:2gb-3145728kb

x   ext:mkv size:2048mb.3145728kb
o   ext:mkv size:2048mb..3145728kb
o   ext:mkv size:2048mb-3145728kb

x   ext:mkv size:2097152kb.3145728kb
o   ext:mkv size:2097152kb..3145728kb
o   ext:mkv size:2097152kb-3145728kb

x   ext:mkv size:2097152kb.3072mb
o   ext:mkv size:2097152kb..3072mb
o   ext:mkv size:2097152kb-3072mb
1-2 = files between 1 and 2GiB are shown
1-3 = files between 1 and 3GiB are shown
x = no results
o = expected results

It seems there are problems with the "gb" unit when used with the smaller number.
vsub
Posts: 479
Joined: Sat Nov 12, 2011 11:51 am

Re: Search query with two "size:"-parameters

Post by vsub »

Look at Help=>Search Syntactic
The correct is .. or - not just .(one dot)

function:start..end Is in the range of values from start to end.
function:start-end Is in the range of values from start to end.
Elbart
Posts: 33
Joined: Sun Jan 24, 2010 12:53 pm

Re: Search query with two "size:"-parameters

Post by Elbart »

vsub wrote:Look at Help=>Search Syntactic
The correct is .. or - not just .(one dot)

function:start..end Is in the range of values from start to end.
function:start-end Is in the range of values from start to end.
Only added those with one dot because I typoed it in the program and it came up with a result anyway.
Elbart
Posts: 33
Joined: Sun Jan 24, 2010 12:53 pm

Re: Search query with two "size:"-parameters

Post by Elbart »

One more bug regarding "size:"
Image
Using "size:<xmb" shows all files except those with sizes between x-1mb and xmb. This probably applies to kb and gb, too.
void
Developer
Posts: 17155
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search query with two "size:"-parameters

Post by void »

Thanks for the bug report.

The search: size:3gb is expanded to size:2147483649..3221225472
Searching for size:<3gb is actually searching for size:<2147483649, it should however be searching for size:<3221225472

I have fixed this for the next release of Everything.

For now, use the <= operator for correct results, for example:

Code: Select all

size:>2gb size:<=3gb
Post Reply