rklockner Posted October 12, 2010 Share Posted October 12, 2010 I am developing a portion of a site for a client. He has an 800 page pdf document that he would like the software to search based on client input. When the user searches, he would like it to display a Google-esque search results page that would display a title (Probably the chapter in which the result was found), then an excerpt from the text surrounding the matching keyword(s). When the user clicks the link, he would like it to take them to the page where the match was found. A big drawback is that this document will be changing fairly regularly and will need to be updated. Initially I thought I could store the pdf in a database as text/html with each page being a record in the table, but with frequent changes, I fear this would be a nightmare to manage. My only other thought is to store the file as one big entry in a table and search the entire entry, which I have done some searching and have come up with some options, but when you click it loads the entire db entry. This would create issues with an 800 page document. Quote Link to comment https://forums.phpfreaks.com/topic/215729-phpmysql-search-like-google/ Share on other sites More sharing options...
eran Posted October 12, 2010 Share Posted October 12, 2010 You should use a document-based text indexing solution such as Lucene or Sphinx. Both are highly performant (especially sphinx) and fit your need much better than MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/215729-phpmysql-search-like-google/#findComment-1121581 Share on other sites More sharing options...
rklockner Posted October 13, 2010 Author Share Posted October 13, 2010 Anyone know of a way to search a word doc and return the content on the page on which the matching word(s) was found? Quote Link to comment https://forums.phpfreaks.com/topic/215729-phpmysql-search-like-google/#findComment-1121834 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.