Re: [PHP] Re: New search related question

2008-02-04 Thread Andrew Ballard
On Feb 4, 2008 3:40 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: strip_tags() perhaps? Perhaps; I've never been thrilled with strip_tags(), but it should work well enough here. But combined with grep? I guess for most searches grep would narrow things down reasonably well before you have to start

Re: [PHP] Re: New search related question

2008-02-04 Thread Shawn McKenzie
OP didn't ask for the best search tool. Back to the horror of cron jobs to updatedb (or were you being sarcastic?) :-) I am familiar with using (s)locate to find files by name etc... But I haven't seen how to index and search file contents. man is no help and I didn't get any google love

Re: [PHP] Re: New search related question

2008-02-04 Thread Robert Cummings
I thought he was extracting the words form the content... maybe just using strip_tags(). Doing that and pushing to a fulltext field would cover most of his bases. Cheers, Rob. On Mon, 2008-02-04 at 14:37 -0600, Shawn McKenzie wrote: Inefficient, maybe. Lazy, most likely yes. I agree that

Re: [PHP] Re: New search related question

2008-02-04 Thread Shawn McKenzie
strip_tags() perhaps? Andrew Ballard wrote: On Feb 4, 2008 3:13 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: If there aren't many files and you don't intend to grow this site much larger and intend to always have static HTML, any easy implementation would be to read each file and search for

Re: [PHP] Re: New search related question

2008-02-04 Thread Shawn McKenzie
Inefficient, maybe. Lazy, most likely yes. I agree that htdig may be a better solution, however his current solution requires upkeep if the static HTML is changed and requires that the person populating the database pick all relevant words from the page and if new ones are added to update the

[PHP] Re: New search related question

2008-02-04 Thread Shawn McKenzie
If there aren't many files and you don't intend to grow this site much larger and intend to always have static HTML, any easy implementation would be to read each file and search for the terms either in the keywords tag or in the entire file. Optionally, if you're on a *nix host you could exec()

Re: [PHP] Re: New search related question

2008-02-04 Thread Robert Cummings
On Mon, 2008-02-04 at 14:13 -0600, Shawn McKenzie wrote: If there aren't many files and you don't intend to grow this site much larger and intend to always have static HTML, any easy implementation would be to read each file and search for the terms either in the keywords tag or in the entire

Re: [PHP] Re: New search related question

2008-02-04 Thread Andrew Ballard
On Feb 4, 2008 3:13 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: If there aren't many files and you don't intend to grow this site much larger and intend to always have static HTML, any easy implementation would be to read each file and search for the terms either in the keywords tag or in the

Re: [PHP] Re: New search related question

2008-02-04 Thread Greg Donald
On 2/4/08, Shawn McKenzie [EMAIL PROTECTED] wrote: I agree that htdig may be a better solution, however his current solution requires upkeep if the static HTML is changed and requires that the person populating the database pick all relevant words from the page and if new ones are added to