[Plugin: Relevanssi – A Better Search] curly or smart apostrophe vs straight
-
I’m using Relevanssi 3.0.4 and had unexpected results when searching for a term which contained possessive words. For example, the results of a query for President’s are not equivalent to the results for President’s (using straight apostrophe vs curly).
This thread gave great instructions on how to replace the default punctuation replace function with my own to deal with the issue:
I copied the function, and before this line:
$a = str_replace("’", '', $a);
I added:
$a = str_replace("’s", "'s", $a);
Then reindexed. That way the curly apostrophes will be treated the same as straight apostrophes. Now a search for doctor’s and doctor’s finds the same results as expected.
Thank you for this great plugin and the valuable support provided even for the free version.
- The topic ‘[Plugin: Relevanssi – A Better Search] curly or smart apostrophe vs straight’ is closed to new replies.