![]() |
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' ? |
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. |
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.
|
Quote:
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. |
Charter, any other ideas for me to try?
|
|
All times are GMT -8. The time now is 05:21 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.