Bug: Date LastXTime (ie, last10mins) also looks far into the future

Discussion related to "Everything" 1.5 Alpha.
Post Reply
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by raccoon »

If you search for a timestamp of the past so-many minutes, it will also return results where the timestamp is erroneously some future date that hasn't yet come to pass.

Example:

Code: Select all

dm:last10mins
Expected behavior: Shows only files modified between now and 10 minutes ago.
Actual behavior: Shows files modified between now and 10 minutes ago, and also 5 years from now in 2027, and also 2099, etc.

Recommend: Internally specify the end-date of NOW and ignore all far-flung futuristic timestamps.

Request: Also add a timestamp constant named "future". Example: dm:future

---
Why do I have files with futuristic timestamps? Because silly people create zip archives with fake dates for each of the timestamps. Here's a specimen file.

Code: Select all

http://web.archive.org/web/20201001195852if_/http://www.neilcic.com/mouthdreams/Neil%20Cicierega%20-%20Mouth%20Dreams%20-%20MP3.zip
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by void »

Currently:
Everything doesn't update the results in real-time.
Everything will find files after the specified date. (even when they are in the future)
The search date is set at search time and doesn't update in real-time.



I'll look into updating a date search in real-time.
Thank you for the suggestion.



Please consider fixing the dates of your from the future:
  • In Everything, sort your results by date.
  • Select the files from the future.
  • From the Edit menu, under the Advanced submenu, click Set File Time....
  • Check Now for date created, date modified and/or date accessed.
  • Click OK.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by raccoon »

I understand the results aren't updated in real-time. This isn't a condition of my bug report, nor a suggestion.

It's just confusing to me that "last10minutes" should include timestamps from 2099. I don't think it should.

Futuristic timestamps are valid, if ridiculous by nature. If someone wants to keep files with futuristic timestamps, they shouldn't have to be shown when using "last10mins". Maybe a new "next100years" constant instead.
Last edited by raccoon on Wed Feb 08, 2023 6:39 am, edited 1 time in total.
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by void »

I should clarify, Everything searches in the future so the results appear real-time.

For example:
I search for dm:last3minutes
I create a new file on the desktop.
This new file shows up in the results as expected.



I'll look into updating the results in real-time and only matching a few minutes into the future.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by raccoon »

Possible mistake in communications. I'm hoping not to discuss real-time result updates.

I'm just talking about any static file on my harddrive that's been sitting there for many years, that has the Date Modified timestamp of 01/01/2099. This file shows up whenever searching for dm:last10mins, and will continue to show up until after 01/01/2099 whenever I use dm:last10mins

If I use the following search combo, I get the results I'd expect.

dm:last10mins !dm:next1000years

(I should not need to specify !dm:next1000years)
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by harryray2 »

I do a lot of time related searches...Updates in real time would be very useful.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by raccoon »

Thanks @void!
void wrote: Thu Feb 16, 2023 6:22 am Everything 1.5.0.1338a adds the following ini settings:

...
date_cutoff_now
Using /date_cutoff_now=1 now gives me the behavior I expected when using the search verb dm:last10mins
It no longer includes results that are far flung into the future.

<3
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by void »

I've been working on a few things here.
Unfortunately, I haven't found a good solution yet.



For now, I would like to keep Everything matching files in the future to pickup changes from a NAS that might have the time set slightly ahead of the client.

I could limit the relative date range to 24 hours in the future.
But then the results will stop updating after a day, which might be unexpected.



I abandoned an idea to requery every minute as I often suggest for users to search for:
*.pdf dm:3months content:"my content search"
and I don't want to requery this content search every minute!



One idea is to add a new relative date range opcode where the date range updates in real-time.
Everything would still need to look slightly in to the future to ensure recent remote files/folders are found.
Each time Everything executes this relative date range opcode, the range is updated to use the current time.
I need more time to work on this one..



For now, I have added a date_cutoff_now ini setting.
When enabled, Everything will set the upper date limit to now.
No new results will be added.

You could also search for:
dm:5mins..now



I've also added a requery: search function.

For example:
requery:60000 dm:5mins

This will update the result list by forcefully requerying every minute (60000 milliseconds)
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by harryray2 »

Is requery the default setting?
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by void »

No, you'll need to specify requery: in your search.

requery: currently works best as a filter / bookmark.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by harryray2 »

Whoops, apologies, I didn't read the post properly. Thought it was an ini setting.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by harryray2 »

Something slightly odd. I've tried using requery, I think it works. I tried using it with pause updates enabled. The requery appears to work even with pause updates enabled. I tried creating and modifying some files and folders but these don't show up.

From a list of files in the search box, they gradually disappear until nothing is left, then nothing happens if I create or modify a file or folder.
void
Developer
Posts: 16775
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug: Date LastXTime (ie, last10mins) also looks far into the future

Post by void »

This is expected.

As time passes no results will match your query.

New results will not show up until you resume updates.
Post Reply