|
09-07-2004, 12:13 AM | #1 |
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' ? |
09-07-2004, 12:35 AM | #2 |
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. |
09-07-2004, 05:21 PM | #3 |
Head Mole
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. |
09-08-2004, 02:02 AM | #4 | |
Green Mole
Join Date: Apr 2004
Posts: 14
|
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. Last edited by mirdin; 09-08-2004 at 02:04 AM. |
|
09-10-2004, 01:28 AM | #5 |
Green Mole
Join Date: Apr 2004
Posts: 14
|
Charter, any other ideas for me to try?
|
09-11-2004, 07:48 AM | #6 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
__________________
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. |
|
|
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 |