Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Fuzzy search 'Alternate spellings'
- This topic has 12 replies, 2 voices, and was last updated 2 years ago by
Ernest Marcinko.
-
AuthorPosts
-
May 24, 2024 at 1:52 pm #48299
pbaines
ParticipantHi Ernest,
We’re wondering what you’d recommend for this search scenario. There are some keywords which have different spellings (UK vs US)
e.g. Pediatric/Paediatric
We want to be able to show results for either keyword. Is there a way that we can still get the same results based on variants of spelling?
I’ve been looking in search behaviour -> keyword logic and matching, but I’m not sure which options would be best for this.
Thanks,
Peter
May 24, 2024 at 3:34 pm #48305Ernest Marcinko
KeymasterHi Peter,
You have multiple options, the most convenient is probably the predictive result suggestions: https://documentation.ajaxsearchpro.com/autocomplete-and-keyword-suggestions/keyword-suggestions#results-suggestions
The plugin will try a different keyword from the given sources, which looks the most similar to the typed in keyword.
Another great option is to use keyword synonyms. It’s a very powerful feature, and works globally with every item indexed.
In your case the Synonyms may actually fit better, if you are aware of the words. You can even use both of the features for the best output.
May 24, 2024 at 3:38 pm #48306pbaines
ParticipantThanks Earnest,
We’ll give the index table synonyms a trial and look into the predictive results too. I think initially when we looked at the predictive results it was gathering from Google, which sometimes wasn’t that relevant. Maybe we’ll switch it up to the search statistcs and trial that.
We did run into some issues with the keyword search and utilising the index table previously. We found that the keyword search was more accurate with it turned off. Does this sound right? Perhaps it needs more time to build?
Thanks,
Peter
May 27, 2024 at 3:27 pm #48318Ernest Marcinko
KeymasterHi Peter,
The index table should be much more accurate, but highly depends on the configuration. Can you share any specifics? I might be able to suggest a solution.
May 28, 2024 at 9:27 am #48327pbaines
ParticipantThanks Earnest, we re-enabled and made some settings tweaks, and the search seems to be as accurate and definitely faster.
The only slightly strange issue that we’re seeing is the custom results template that we were using, within the child theme in asp/vertical.php no longer seems to be getting used, and results are defaulting to a stacked layout.
To add some context, this only seems to be happening when just ‘page’ post types are found. If the results contain ‘pages’ and another post type, our custom template is shown.
Does the template change with the index table results for pages?
May 30, 2024 at 6:43 am #48342Ernest Marcinko
KeymasterThat should not be happening at all. I just checked the corresponding code section, and it should always include the template from the theme directory if it exists, regardless of anything.
I may have to check this directly to see what is going on. Can you add temporary FTP and back-end access? I will try to run a debug query to see what’s going on in the template engine.
May 30, 2024 at 10:43 am #48350pbaines
ParticipantYou cannot access this content.
May 31, 2024 at 7:32 am #48362Ernest Marcinko
KeymasterThanks for the details!
I tried every single possible way, but it seems to work all right on my end. I have noticed though, that the results cache is enabled – which could explain the issue. If the templates were not in place yet and a search was conduced, the results were cached including the complete output.
I can’t replicate probably because the cache have expired by now. I forcefully cleared the cache just to be sure, but I can’t seem to replicate the problem.
The templating paths are correct as far as I can see. I also recommend updating to the latest version of the plugin 4.26.11, just to be up to date.May 31, 2024 at 9:50 am #48363pbaines
ParticipantHi Earnest,
Thanks for taking a look, and strange that you can’t recreate.
I’ve tried the following:
– Updated the plugin (4.26.11)
– Disabled index table engine and reenabled
– Disabled caching
– Cleared WPEngine cacheI’ve attached a video of what we’re seeing, reported across multiple devices in multiple locations.
There must be something strange going on with the index table engine, as I cannot recreate this with the regular engine. We can swap back to the regular engine, but that means we cannot use some of the features of the index table engine, such as synonyms.
If there is another way to speed up the search instead, and retain the features within the index table engine, we can use that.
May 31, 2024 at 11:42 am #48365Ernest Marcinko
KeymasterInteresting, I’m not sure why I can’t replicate this. I suspect it might be to do something with the timing.
Either way, I have a suspicion of what might be causing it. I see you have a child theme active, and I guess the other site may have the non-child theme active. So if I’m correct, then for some reason the switch of the blogs during the search is not reverting back correctly.
I have moved a piece of code via FTP so the switch happens sooner, but I can’t test it as it’s working on my end. Can you please see if you get anything different now?
May 31, 2024 at 11:47 am #48366pbaines
ParticipantAmazing, I think thats fixed it! Thanks a lot.
I’ve performed some of the same searches and the issue has stopped occurring.
Can you let me know what you added so that I can move to my local?
Best,
Peter
May 31, 2024 at 11:54 am #48367Ernest Marcinko
KeymasterNeat, then it’s a bug, I will make sure to perma fix this for the next release.
Copy the contents of the
wp-content\plugins\ajax-search-pro\includes\classes\Search\SearchPostTypes.phpand that’s it.May 31, 2024 at 12:24 pm #48368Ernest Marcinko
KeymasterI will conduct a few more test on your site if you don’t mind. Don’t get scared if you see the wrong results again, it’s just me testing solutions – sorry about that 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.