Cherrytree is nice, notes are organised in a hierarchical tree, stored in sqlite database or in XML. You can edit either in text or in rtf.
https://www.giuspen.com/cherrytree/
However now I just use text or markdown files organised by theme in folders. I search with grep, I can use versioning, and I can edit with with my favorite text editor. Simplest solution :)
thanks. i know.