What is the best document search engine (perhaps Plucene?) to integrate into Perl code that allows customizing and tuning the search algorithm?
Consider using KinoSearch instead. Then, read its tutorial.