wrote this ages ago, if you want something to put all your office docs and pdfs in a solr database on FreeBSD (indexable by page number), knock yourself out...
https://gist.github.com/awhileback/1fffac899d9321a6a9ec15bc9...
Requires some ocr / pdf parsing / metadata tools, see the comments.