Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search issues with punctuation, word position in sentence › Reply To: Search issues with punctuation, word position in sentence
Thank you, I can log-in now and see your configuration.
However, I still don’t understand the issue with the ‘search terms at the beginning of sentences’. Can you please describe this, or perhaps give me a few examples. I have tried search keywords that are at the beginning of sentences, but I’m seeing those results as well.
Apostrophes and special characters
The problem arises from the fact that there are multiple apostrophe characters used. For example ‘ is not the same as ’. When database is instructed to look for the words entered, it cannot make a difference between one apostrophe and another. For the database, those are just two separate entities, like letters ‘a’ and ‘b’.
The two possible solutions in this case are:
1. Replace the apostrophe (and any other undesired characters) from the input phrase with an empty space.
Solution: Knowledge base – Replace or remove characters from search phrase
2. ..or replace whole words with different words within the input. (for example replace women’s with women only)
Solution: Knowledge base – Replace search keywords (whole words)
Both of these require a custom code, but it should not be too difficult, I tried to add as many explanatory lines to these knowledge base articles as possible. Let me know if you have any questions though.
I personally prefer solution 1, as it’s much simpler, but then solution 2 offers replacements for whole words with a different word, so in that case adding lines like:
..to the $replace array, will replace both versions of the input with the word ‘women’, which will then yield results.Best,
If you like my products, don't forget to rate them on codecanyon :)