PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   ignore special characters like - (http://www.phpdig.net/forum/showthread.php?t=1272)

mirdin 09-06-2004 11:13 PM

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 09-06-2004 11:35 PM

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.

Charter 09-07-2004 04:21 PM

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.

mirdin 09-08-2004 01:02 AM

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.

mirdin 09-10-2004 12:28 AM

Charter, any other ideas for me to try?

Charter 09-11-2004 06:48 AM

http://www.phpdig.net/forum/showthread.php?t=200


All times are GMT -8. The time now is 07:50 PM.

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