Re: I Need to search over 100 largeish text documents efficiently. What's the best approach? [message #184746 is a reply to message #184735] |
Mon, 27 January 2014 21:14 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) |
Rob Bradford
Messages: 5 Registered: February 2011
Karma:
|
Junior Member |
|
|
On Sunday, 26 January 2014 13:34:21 UTC, rob.brad...@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
Thanks for all the suggestions, and my gripe with the hosting provider is not that they closed the security risk, just the lack of notice that it was going to happen, then leaving me to wonder why stuff had stopped working.
Rob
|
|
|