Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #12712
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? |
| Date | 2014-01-26 10:29 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <lc39lk$iki$1@dont-email.me> (permalink) |
| References | <33e1e7bb-c38e-425a-a19c-b1100a2bf819@googlegroups.com> |
On 1/26/2014 8:34 AM, rob.bradford2805@gmail.com wrote: > As part of my hosting providers re-platforming cycle my site has moved server, on the new server and all new servers php exec() and equivalents are blocked, this has taken out my fast document search that used exec() to call grep then awk. I now need to do the grep part as effectively as possible in PHP as I can no longer access the shell from the scripts. The awk part is easily sorted. > > What is the best/fastest approach to scan 100+ largish text files for word strings, I really don't wish to index each file into a database as the documents change quite frequently. my grep-awk scan was around one second to begin rendering the results page, I know I can't match that but I can't afford too much of a delay. > > Any ideas appreciated whilst I look for a new hosting provider, I feel that any hosting set up that makes such a change without notification really has no respect for it's clients. > > Rob > Whether the files change frequently or not, your best bet is going to be putting the documents in a database. You won't be able to do anything nearly as fast in PHP as the database does. And it isn't that hard to insert the documents into the database when they are uploaded. And kudos to your hosting provider for closing a huge security exposure. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
I Need to search over 100 largeish text documents efficiently. What's the best approach? rob.bradford2805@gmail.com - 2014-01-26 05:34 -0800
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Richard Damon <Richard@Damon-Family.org> - 2014-01-26 09:09 -0500
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Michael Vilain <vilain@NOspamcop.net> - 2014-01-26 13:34 -0800
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Jerry Stuckle <jstucklex@attglobal.net> - 2014-01-26 10:29 -0500
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-26 20:14 +0000
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? The Natural Philosopher <tnp@invalid.invalid> - 2014-01-26 19:56 +0000
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-26 20:55 +0000
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-27 01:43 +0000
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Arno Welzel <usenet@arnowelzel.de> - 2014-01-27 10:58 +0100
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-27 12:23 +0000
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-01-27 17:05 +0000
Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? rob.bradford2805@gmail.com - 2014-01-27 13:14 -0800
csiph-web