PHP File Searching

Reply

Join Date: Feb 2005
Posts: 1
Reputation: zixp is an unknown quantity at this point 
Solved Threads: 0
zixp zixp is offline Offline
Newbie Poster

PHP File Searching

 
0
  #1
Feb 6th, 2005
I am using php to search the file names of about 10,000 files. It works now, but for it to find the file the search phrase has to be found exactly within the file name. I would really like to get a fuzzy search feature workings, but things like similar_text() have crashed the site, I am assuming because they are so intensive. I have only tried similar_text and levenshtein. Any ideas are appreciated.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 11
Reputation: rice_web is an unknown quantity at this point 
Solved Threads: 1
rice_web rice_web is offline Offline
Newbie Poster

Re: PHP File Searching

 
0
  #2
Feb 20th, 2005
Originally Posted by zixp
I am using php to search the file names of about 10,000 files. It works now, but for it to find the file the search phrase has to be found exactly within the file name. I would really like to get a fuzzy search feature workings, but things like similar_text() have crashed the site, I am assuming because they are so intensive. I have only tried similar_text and levenshtein. Any ideas are appreciated.
GREP can be your friend. Those preg functions might be able to pull off what you're looking for. For instance, you might put together a statement that takes vowels "/[aeiou]/" and replaces them with an identifier tag like "##" in both your query and your array of files. Then check each file for a preg_match. I suppose it's a bit complex a script, but it shouldn't at least crash.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC