I'm taking notes for more than 10 years and have a rather big collection. I have tried many apps but after losing data due to proprietary formats I won't use anything else then plain text anymore. Nowadays I write everything down as Markdown files that I have stored on my local disk in hierarchical folders (backed up by Spideroak).
The only part I wasn't happy with was search. So I have built my own local search engine. It treats the first line of a Markdown file as a line of tags that I can search for. It takes advantages of Markdown syntax (e.g. words in headlines get a scoring boost) and it can also open files in my editor, integrating quite well in my daily work flow.
It's on Github if interested: https://github.com/BernhardWenzel/markdown-search