On OS X, I use DEVONthink Pro Office with a ScanSnap iX500 scanner, and does pretty much what you're describing. OCR is really good.
While it manages the directory structure, all documents are stored "bare" in its filesystem folder. That is, you can create a Foo.pdf in DEVONthink and then access it from ~/Documents/whatever/PDFS/Foo.pdf (or however it names the directories).
Machine learning classifies incoming documents and can suggest relationships between them.
I'm not related to them, I promise. :-) I'd bought DT a while back but hadn't used it much until I got Doo as part of a software bundle. I played with it a while, realized I already had DT which was much more powerful, and started using it more.