Re: [PHP] Searching in a long text

2009-01-03 Thread Andrew Ballard
On Sat, Jan 3, 2009 at 4:28 AM, Yeti wrote: > What if the whole text has only 1 line? > I would worry more (though probably not much) about the fringe cases where a match spans across lines (or pages) such that it would either prevent a qualifying match from being returned at all, or a highly rel

Re[2]: [PHP] Searching in a long text

2009-01-03 Thread Vicente
Richard wrote: > You could look into using Zend_Search_Lucene, which is part of the > Zend framework. It's file based and so doesn't require the use of > MySQL. Might make it slightly more portable if that's a concern. It > will be a little more work than simply using MySQL, but it would be > wort

Re: [PHP] Searching in a long text

2009-01-03 Thread Richard Heyes
> ... You could look into using Zend_Search_Lucene, which is part of the Zend framework. It's file based and so doesn't require the use of MySQL. Might make it slightly more portable if that's a concern. It will be a little more work than simply using MySQL, but it would be worth it I think. --

Re: [PHP] Searching in a long text

2009-01-03 Thread Robert Cummings
On Sat, 2009-01-03 at 01:28 -0800, Yeti wrote: > What if the whole text has only 1 line? What if? Shouldn't matter. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Searching in a long text

2009-01-03 Thread Robert Cummings
On Sat, 2009-01-03 at 09:26 +0100, Vicente wrote: > 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 pl

Re: [PHP] Searching in a long text

2009-01-03 Thread Yeti
What if the whole text has only 1 line? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Searching in a long text

2009-01-03 Thread Vicente
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 b