Searching in a long text
| From: | Vicente | Date: | Sat, 03 Jan 2009 08:26:31 +0000 |
| Subject: | Searching in a long text | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-285390@lists.php.net to get a copy of this message | ||
Hi all,
I'm implementing a search tool to find phrases inside a book.
Users will search for some word, then the engine will returns
the 3 or 4 lines containing that word, and giving also the book page
number.
I have the book in plain text and the doubt is about different
approaches in order to be speedy and saving memory and resources:
- adding every text page inside fields of one MySQL table.
- having the whole book as a unique text file, with some marks in
every page to delimit and parse the page number
Also, I want to know if there is some possibility to make the same
using PDF files.
thanks in advance