ive been doing this stuff about years ago, but not pure php.
sorry to a little OOT.
i use PHP OCR and Oracle.
i use php in order to read list and create command to run ocr.
then use another php to read and insert it to oracle.
in oracle i create an "text index" then back to php to do a simple on database.