PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 11-08-2003, 06:09 AM   #1
Big_ben
Green Mole
 
Join Date: Nov 2003
Location: lübeck, Germany
Posts: 3
Question Directory structures appear as one word

Hi,
I am new here and this is my first post. I am planning on using phpdig for a search engine in my LAN, in order to find shared files and webpages. My problem is that in filenames like:.
Quote:
Download/Games/Battlefield_1942_Desert_Combat_Mod/battlefield_1942_patch_v1.3.exe
are found as one keyword. I was able to find these by changing the max_keyword_length variable, but what i would really like, is that when a / comes to define that as end of the word, and or signal that a new word is coming. Then in the above example would change to 4 keywords. I'm guessing that I need to change the following lines, but since php is somewhat new to me, I am not sure what I need to add.
Quote:
libs/php_functions.php (line 223)

$text = ereg_replace('[[:blank:]][0-9]+[[:blank:]]',' ',ereg_replace('[^'.$phpdig_words_chars[$encoding].'._&%/-]+',' ',$text));
$text = ereg_replace('[[:blank:]][^ ]{1,'.$min_word_length.'}[[:blank:]]',' ',' '.$text.' ');
$text = ereg_replace('\.+[[:blank:]]|\.+$|\.{2,}',' ',$text);
return trim(ereg_replace("[[:blank:]]+"," ",$text));
Big_ben is offline   Reply With Quote
Old 11-08-2003, 10:10 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Instead, perhaps try the following and then crawl a demo page.

In robot_functions.php find:
PHP Code:
$separators " "
and replace with:
PHP Code:
$separators " /"
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 11-08-2003, 11:21 AM   #3
Big_ben
Green Mole
 
Join Date: Nov 2003
Location: lübeck, Germany
Posts: 3
Yeah that seemed to do the trick. Thanks alot!
Big_ben is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only searching from start of word benklocek Troubleshooting 1 03-18-2005 02:14 PM
Indexing "<word>-<word>"? FaberFedor How-to Forum 23 02-28-2005 04:35 AM
serach more than one word jjpcoca How-to Forum 1 06-19-2004 06:42 AM
Indexing word docs javajaga External Binaries 1 03-30-2004 09:19 AM
What's in a word for 1.8.0? renehaentjens How-to Forum 10 02-18-2004 04:37 AM


All times are GMT -8. The time now is 10:37 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.