tomboy-notes / tomboy-ng

Next generation of Tomboy
MIT License
389 stars 38 forks source link

"Search While You Type" did not find a valid note, but regular search did, and then "Search While You Type" did after that #283

Closed dajoker closed 1 year ago

dajoker commented 1 year ago

openSUSE 15 tomboy-ng 0.35-2 installed 2022-11-15 5200+ notes, 64 MiB directory of notes, backups, whatever

I have not noticed this before, but since I usually trust the search (including "Search While You Type") I think it might be rare, maybe even a one-time thing so far. I was also using case-insensitive search from the Search dialog as I almost always do. The search within a specific note did not show this problem at the time.

My search was for notes related to a specific five-letter (lower case, alphabetic characters only) topic from last week, and since my notes all have a date in their name I was specifically searching for "2022-12-0" in addition to the five letter term. Finding the notes by date alone worked, but adding the five-letter term caused some of the notes that should have remained to go away. It is only because I knew the notes must have mentioned the topic that I opened them, saw the word in there (different case, but should still work), tried a couple more times, and still saw the same result. The search was very responsive, adding/removing notes immediately with each keystroke, as usual.

From the Search dialog box I then changed the options to not search while I type, put in the date substring "2022-12-0" and the term, and the notes were all found properly. I probably edited the notes at that time, which could be relevant for index building purposes, but I'm not sure. I am sure that once I went back to "Search" and enabled "Search While You Type", the notes showed up properly.

I'll watch for this again, but if there are troubleshooting steps I can take next time to narrow down the issue I'll accept those too. This is my production/important instance of tomboy-ng, so if anything is risky please let me know ahead of time.

davidbannon commented 1 year ago

Hmm, don't like the sound of that !
Some probing question just in case we trigger something ....

Your notes that have a date in the name, is the date the whole name, the default name that appears on a new note ?

If you can find a way to trigger the problem, we can do some debugging. In something like this, there really is no "one off", if its happened once it can happen again, it just takes the right circumstances. Trouble is with this particular problem, you (and I) might be unaware of it, just assume we are being shown all available notes. Yek !

This is my production/important instance of tomboy-ng, so if anything is risky please let me know ahead of time.

Nothing is without risk but I really don't think you have any chance of losing a note, just not finding it when you need it. Thats not too bad if you know its there and can search in another fashion. Not always the case ....

The new search engine is complicated, thats why it was such a long release cycle. I would be the last person to claim its bug free !

I'll try and replicate what you describe.

Davo

dajoker commented 1 year ago

The note name:

AB LLC 2022-12-06 - Daily Log

I create one each day for the work I do, keeping track of clients and the tasks I do for them within, formatted kinda like this:

Customer Name - Super Fun Project Name

Started at 04:30 MST

Did work of this type, and that type, and otherwise made a nuisance of myself, blah blah blah

And a bit more, blah blah.

In this case I was searching both for the date (2022-12-06) and the customer name with just the one word "Customer", so in my view there is nothing interesting about this. I do not, as a rule, use bullets or other special formatting, and it definitely was not the first or last line of any note.

I'll see what I can do to find the problem again. I search my notes a lot, often knowing something should be there and being able to find them as a result, so hopefully I'll notice if something that should be there (and is) doesn't pop up. As always, thanks for your help, software, and willingness to discuss this.

dajoker commented 1 year ago

Saw the issue again today. I was searching for "1.2.4" (sans quote) in the main search box in order to find a note which had the following text (not in the header/title):

Section 1.2.4: spt_managed_attribute.extended11 may actually benefit from an index as I see it is used in a Filter for a query.

The note did not turn up, so I eventually found the note another way, I think by searching for "extended11", at which point I realized the other search should have worked. I then disabled "Search While You Type" and searched again, which worked. I then re-enabled "Search While You Type" and now the note shows up in the list properly. It seems, again, like the index may have just needed a rebuild or something. The note in question is not new, from created in its current form over a week ago on 2022-12-16.

davidbannon commented 1 year ago

OK, I can replicate that ! It will find 2.4 but not 1.2.4 Going to take some digging ! Thanks !

Davo

davidbannon commented 1 year ago

OK, got it. Combination of two bugs (sigh) that needed to be invoked together. Quite easily fixed but its in the quite delicate part of the code that needs to be as fast as possible, I'll need to do some testing under different conditions just to be sure. Thanks Aaron, its a quite nasty bug, far more likely to happen in normal use than in my release testing ! I'll put out a bugfix release shortly. Davo

davidbannon commented 1 year ago

Resolved in the newly released 0.35a Thanks