PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 09-07-2004, 12:13 AM   #1
mirdin
Green Mole
 
Join Date: Apr 2004
Posts: 14
ignore special characters like -

When someone searches for the keyphrase 'word1 word2' , but in the site it is written as 'word1-word2' then no results are found.

How can I have the '-' ignored in order to have searches for 'word1 word2' also return results like 'word1-word2' ?
mirdin is offline   Reply With Quote
Old 09-07-2004, 12:35 AM   #2
mirdin
Green Mole
 
Join Date: Apr 2004
Posts: 14
I think I already solved it.

I added '-: ' to the end of $phpdig_string_subst['iso-8859-1'] in config.php. Is this the correct way?

EDIT: This doesn't work, as it converts the space to a - character, I would like to have both 'word1 word2' and 'word1-word2' to show up in the results.

Last edited by mirdin; 09-07-2004 at 01:14 AM.
mirdin is offline   Reply With Quote
Old 09-07-2004, 05:21 PM   #3
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Perhaps try adding a - to the very end of the last character class in every instance of the $stop_regs variable definitions is the search_function.php file. Let me know how it works.
__________________
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-08-2004, 02:02 AM   #4
mirdin
Green Mole
 
Join Date: Apr 2004
Posts: 14
Quote:
Originally Posted by Charter
Perhaps try adding a - to the very end of the last character class in every instance of the $stop_regs variable definitions is the search_function.php file. Let me know how it works.
Thank you replying Charter.

I tried what you suggested and added a - to the end of stop_regs string (twice)

$stop_regs = "[][(){}[:blank:]=&?!&#%\$£*@+%:;,/\.'\"]-";


Unfortunately this didn't work. The number of results are the same. The only thing that changed was results' descriptions.

Last edited by mirdin; 09-08-2004 at 02:04 AM.
mirdin is offline   Reply With Quote
Old 09-10-2004, 01:28 AM   #5
mirdin
Green Mole
 
Join Date: Apr 2004
Posts: 14
Charter, any other ideas for me to try?
mirdin is offline   Reply With Quote
Old 09-11-2004, 07:48 AM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
http://www.phpdig.net/forum/showthread.php?t=200
__________________
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

Thread Tools

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
Ignore links with a particular querystring gkdeveloper How-to Forum 0 09-12-2007 04:05 AM
Ignore sections of a page gkdeveloper How-to Forum 0 09-12-2007 03:17 AM
Does PHPDig ignore <base href...? andybak Troubleshooting 5 04-19-2004 12:43 PM
Problem searching special characters like éèÃ* jeanvm Troubleshooting 1 03-19-2004 02:08 PM


All times are GMT -8. The time now is 01:13 PM.


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