Can you provide some examples (and possibly screenshots) of such notes? I don't really use search on Android, but I've just done some basic testing right now, and title:<term> doesn't seem to return unrelated notes for me here. Testing with Joplin v3.1.2.
The results are actually identical to "All notes".
The search takes quite a bit of time (I have 10k notes) and the results evolve over several stages (one actually showing correct results) but the final result is the screenshot.
In Configuration => Tools, there's a button "Rebuild search index". Could you try pressing this to see if it makes a difference?
There was a time when the search index could get corrupted on mobile, although normally it shouldn't happen anymore but that would still be worth a try.
I tried "fix search index" on my android. Looking at "FTS" keyword in the logs I could see the rebuild completed in 10 minutes and inserted 14k items, deleted 0. However the issue persists.
I will keep looking into logs and try sharing them here.
That's very strange. I can say that for me title:something works as expected, but in your case the results are clearly unrelated.
Maybe it's down to the Android version and associated SQLite version. If you go in Configuration => More info. Does it say if FTS is enabled? (it's at the bottom of that screen)
I don't see any issue in there. Just to be sure, could you try disabling all plugins to see if it makes a difference? That would be unlikely that a plugin would interfere with search but worth a try anyway
I disabled plugin support and the issue persists. I deleted all plugins, killed and restarted the app and the issue persists (title:cat search eventually returns unrelated notes).
I was all along using my main device (Boox Tab Ultra).
Interestingly the issue doesn't happen on a similar secondary device (Boox Note 3) with similar configuration and plugins. title:cat returns correct results there.
I could not find a difference which would explain the two behaviors. Any idea welcomed.
Going to bed now, will read your answers tomorrow.
Documentation says a special custom search mode is automatically enabled when Chinese characters are detected. I do have such characters in some of my 10k notes. But that would not explain why there is no bug on my secondary device with the same dataset.
I have been playing with various searches on my problematic device.
Interestingly, title:pro returns unrelated results (notes without any pro in title) but a few of the notes have title keyword occurrences highlighted in their body.
Why would a title:pro search highlight the title keyword in note bodies?
Maybe the "search as you type" form is to blame, it somehow mixes results of title and title:pro? title:pro results show up quite fast then asynchronously much later the results of title are injected and eventually mess up the final results?
When I type title:cat extremely slowly (several seconds between letters) the bug no longer happens!
This is definitely a bug about the "search as you type" feature which struggles on large datasets. Instead of showing you only the results of the final search title:cat, it somehow mixes in results of partial t, ti, title searches imho instead of cancelling them and ignoring their results.
Another suggestion: add the beginning and ending of each search attempt in the logs, together with the full search string e.g. title:cat. It would make understanding what's happening with the search much easier.
I agree and have the same issue on mobile! Random, unrelated notes pop up during the search, even with a delay, which often causes me to select the appearing right search results, only to get redirected to an unrelated note because the search list gets updated during the selection.
On desktop, a related issue was just fixed (1)