-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OneMore 'tag search' finds a fraction of tag cases #1695
Comments
The algorithm is based on last update timestamp on each page. It will only look at a page if it has been modified or edited in any way since the previous hashtag scan. Once the scan completes, it records the current time so it can compare that with pages edited later on. On the very first scan, it assumes every page has been edited so should scan them all. It stores hashtag info in the database file %appdata%\OneMore\OneMore.db. At the moment, only hashtag info is stored in that database. So you could close OneNote, delete this file, and then reopen OneNote. OneMore should start a brand new scan and find all tags. I'm guessing there was some weird order of operations that caused the timestamp algorithm to get confused and think some pages were not modified. |
So is the update stamp independent on each PC? i,.e. if I update on PC1 and it doesn't sync to PC 2 for 20 seconds, what is the "last updated" PC1 time or PC2 time or is it all based on the hosted server? If there is any doubt, maybe you should have a LastScanStarted -x seconds in the settings (x = 0 - 300) and do a slow (very few pages per normal scan) "do everything" march back in time to catch all. It's weird, there are 4 of us using shared ON's and I am sometimes tags are missed, but I can't be completely convinced. When you scan a page, do you update the "last checked" in your OneMoreDB for that page? |
@jasonjac2 Each PC is independent with its own DB and LastScanTime. There is one LastScanTime recorded on each PC when the scanner runs on that PC. Each page has its own last-updated time, recorded by OneNote; the OneMore scanner relies on this. Each PC runs its own scan, relying on its own copy of the LastScanTime. Even if two PCs scan at the same time, they will both see recently updated pages (for those shared across OneDrive of course). Even if the page is updated in between PC1 scan and PC2 scan, both will ultimately pick up changes at their next local scan. EDIT: It writes the LastScanTime at the end of the scan. It could be improved to record the start of the scan instead... thinking.... |
Hi @stevencohn |
@stevencohn thanks for the explanation. I see the started scan as much safer, but my issue is really with the definition of ON's last modified..... if it comes from the source of the modification (some other machine) or the mother storage (OneDrive / Sharepoint), it could still be seconds or minutes before when you started the scan.
I am a little worried it would the the originators time (which may be seconds or minutes after your scan started or finished. |
I double-checked the algorithm. Turns out that it is correct! When the scanner is instantiated, before it starts scanning, it records the current time in a variable. When it's done, it records the value in that variable in the database as the latest LastScanTime. So there is no gap. @jasonjac2 As far as I can tell, the client machine is responsible for setting the last-modified timestamp on a page. If the clocks on two machines are drastically off, then a page's last-modified timestamp may be missed by late machine. But if you're using a modern version of Windows, they should sync with time.windows.com. |
LAst scan = start of last scan -excellent. Sorry for labouring the discussion, but to be clear then. Once the dust settles, each machine will have different "last modified" for the same page? Assuming it takes at least a second from change to sync from source machine to cloud and then to sync with "client"? On the other hand - If the source client sets the modified, then assuming that MS is having a bad day OR you are on a crappy set up OR you lose connection (on a train plan or automobile), then you end up with "cracks". I'll do an experiment today. |
Since the solution suggested solved the issue, I've run into a new problem. |
Deleting the db is the nuclear option. Any other steps to reproduce? |
Problem to Solve
Searches for my tags will bring up only a fraction of the notes that include any given tag. There is no apparent pattern, it finds both recent and older notes, and notes from several sections within the specified notebook.
The tags used are simple, one example being: #no_fill
That tag is on at least 10 pages, but only 3 pages show up in the search. Last scan is up to date.
To Reproduce
[Can't say if this will reproduce on other machines]
Steps to reproduce the behavior:
-Search for any given standard tag
-See that not all are shown
Expected Behavior
I expected all cases of any specified tag (within the relevant notebook) to show up in the search list.
Environment (if applicable)
Additional Context
Sorry if this is a simple mistake on my part, but I don't see anything that could explain this
The text was updated successfully, but these errors were encountered: