It’s not free/oss, and it’s on the Apple ecosystem, but DEVONTHINK does a fantastic job of this, and supports storing all of your documents in a webdav store which you can host yourself. It uses Aabbyy fine reader for ocr which I have found to provide better results than tensorflow based ocr.