Page 1 of 1

About search (added picture description)

Posted: 26 Jul 2021 08:49
by kuiwu_zh
Question 1:

snap_screen_20210726172758.png
snap_screen_20210726172758.png (47.1 KiB) Viewed 1076 times

Code: Select all

ageM: 1 h

This expression can search for files.


snap_screen_20210726172853.png
snap_screen_20210726172853.png (43.03 KiB) Viewed 1076 times

Code: Select all

ageM: 1h

This expression cannot search for files.



Why? Thank you.








Question 2:

snap_screen_20210726143222.png
snap_screen_20210726143222.png (12.06 KiB) Viewed 1099 times

Code: Select all

ageM: <= 1 h

The options on this picture are equivalent to this expression.


snap_screen_20210726143249.png
snap_screen_20210726143249.png (11.88 KiB) Viewed 1099 times

What expression is equivalent to the options on this picture?



Thank you.

Re: About search (added picture description)

Posted: 28 Jul 2021 10:45
by admin
Question 1: This is how the syntax is defined: there MUST be a space between counter and unit.

Re: About search (added picture description)

Posted: 28 Jul 2021 10:52
by highend
Why isn't it the same for sizes? 1MB is a valid expression

Re: About search (added picture description)

Posted: 28 Jul 2021 10:54
by kuiwu_zh
But I tested that the result of the following expression is the same.

Code: Select all

:*.cpp AND ageM: <= 1h
:*.cpp AND ageM: <=1 h
:*.cpp AND ageM:<= 1 h
:*.cpp AND ageM:<=1h

Re: About search (added picture description)

Posted: 28 Jul 2021 11:16
by admin
kuiwu_zh wrote: 28 Jul 2021 10:54 But I tested that the result of the following expression is the same.

Code: Select all

:*.cpp AND ageM: <= 1h
:*.cpp AND ageM: <=1 h
:*.cpp AND ageM:<= 1 h
:*.cpp AND ageM:<=1h
Maybe the same but WRONG. When the space is missing the unit will fall back to *days*, not hours.

Re: About search (added picture description)

Posted: 28 Jul 2021 11:17
by admin
But relax. I just added a bit of tolerance. From the next beta onwards that space is optional.

Re: About search (added picture description)

Posted: 28 Jul 2021 11:21
by kuiwu_zh
I see. Thank you.

How do I write the expression of Question 2?

Re: About search (added picture description)

Posted: 28 Jul 2021 11:53
by admin
kuiwu_zh wrote: 28 Jul 2021 11:21 How do I write the expression of Question 2?
Good question. These terms are always treated as "start of unit", so it's only possible by changing the unit. Instead of "1 d" you can use "24 h" or "1440 n" depending on how exact you want it to be.