PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 09-20-2003, 06:49 AM   #1
redlock
Green Mole
 
Join Date: Sep 2003
Location: Germany
Posts: 7
phpdig not index numbers.

phpdig not index numbers.

i have replace (found in forum)

In the file phpdig/libs/phpdig_functions.php find the function called 'phpdigEpureText'.:

$text = ereg_replace('[[:blank:]][0-9]+[[:blank:]]',' ',ereg_replace('[^[:alnum:]ðþ._&ß%/-]+',' ',$text));

with the following two lines:

$text = ereg_replace('[^[:alnum:]ðþ._&ß]+',' ',$text);

but it works not,

numbers like 2002, 477 or 2006 are not found, although they stand as plaintext in HTML. i have already update the files there numbers are = no result

please help.

--
sorry for my english, i´m german
redlock is offline   Reply With Quote
Old 09-20-2003, 12:54 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hallo. Die PhpDig 1.6.2 Version von Funktion phpdigEpureText ist wie folgt:
PHP Code:
function phpdigEpureText($text$min_word_length=2$encoding=PHPDIG_ENCODING) {
global 
$phpdig_words_chars;

$text phpdigStripAccents(strtolower ($text));
//no-latin upper to lowercase - now islandic
switch (PHPDIG_ENCODING) {
   case 
'iso-8859-1':
   
$text strtr$text,'ÐÞ','ðþ');
   break;
}
$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));

Diese Funktion läßt Sie auf Zahlen (Versuch es hier) suchen und, in config.php, können Sie die Wortgröße einstellen, um zu ignorieren.

Hoffen Sie, daß mein Deutsch lesbar ist.
__________________
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 09-21-2003, 10:57 PM   #3
redlock
Green Mole
 
Join Date: Sep 2003
Location: Germany
Posts: 7
thanks.

but, it works not correctly!

for example:
in some html-site are numbers like 2002/2003 or 481, 477, BR 476. the search found only the number 2002 but not the number 2003 although it is in the same file! i don´t understand this.
i have also the files again indexed = no result
redlock is offline   Reply With Quote
Old 09-26-2003, 04:52 PM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. I've been able to replicate the problem with phrases and will work on it for a future release.
__________________
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 10-05-2003, 01:15 PM   #5
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Just curious... Are you using "words begin," "exact words," or "any words part" when performing the search on numbers?

For example, if you have 2002/2003 and search on 200 with "words begin" then you should get 2002/2003, but if you search with "any words part" than you should get 2002/2003.
__________________
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 10-06-2003, 06:00 AM   #6
redlock
Green Mole
 
Join Date: Sep 2003
Location: Germany
Posts: 7
yes, i have the same problem

For example: 2002/2003
Search: "200

search with "words begin" = 2002/2003
search with "exact words" = only the number 200
search with "words begin" = 2002/2003

another example on the same homepage:
on one site : "481" and "1995" and "2003"
every Search it found only "481"

or

another example on the same homepage:
on one site : "481" and "477"
every Search it found nothing!

= curious
redlock is offline   Reply With Quote
Old 10-06-2003, 02:44 PM   #7
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Actually, that's the way I think it's supposed to work, although I can see where it can be improved. Here's what it's doing:

For a search with "words begin" => 2002/2003, this is because the 2002/2003 begins with [space]200, whereas the 200 in 2003 actual begins with [space]2002/ so it's not found.

For a search with "exact words" => only the number 200, this is because it's looking for [space]200[space] and nothing else.

For a search with "any words part" => 2002/2003, this is because it doesn't care what is at the beginning or end, just as long as 200 is in there somewhere.
__________________
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
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
How to Include Numbers which occur in names galacticvoyager How-to Forum 1 11-12-2005 01:45 PM
Indexing of numbers jerrywin5 How-to Forum 3 04-06-2005 01:08 PM
fuzzy search on product numbers indeh How-to Forum 0 10-13-2004 11:33 AM
Numbers everywhere... Nad Troubleshooting 10 07-14-2004 01:43 AM
Numbers BernhardG Bug Tracker 2 10-10-2003 04:20 AM


All times are GMT -8. The time now is 05:26 AM.


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