With http://www.recoll.org/ based on the Xapian search engine library, you can do kickass document search. There's a python library so it's relatively easy to take your website's document search form to the next level. Impressive stuff.