Fuzzy search 'Alternate spellings'

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Fuzzy search 'Alternate spellings'

This topic contains 12 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 week, 6 days ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #48299
    pbaines
    pbaines
    Participant

    Hi 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

    #48305
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #48306
    pbaines
    pbaines
    Participant

    Thanks 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

    #48318
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #48327
    pbaines
    pbaines
    Participant

    Thanks 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?

    • This reply was modified 2 weeks, 2 days ago by pbaines .
    Attachments:
    You must be logged in to view attached files.
    #48342
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    That 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #48350
    pbaines
    pbaines
    Participant
    You cannot access this content.
    #48362
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thanks 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #48363
    pbaines
    pbaines
    Participant

    Hi 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 cache

    I’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.

    Attachments:
    You must be logged in to view attached files.
    #48365
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Interesting, 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?

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #48366
    pbaines
    pbaines
    Participant

    Amazing, 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

    #48367
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Neat, 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.php and that’s it.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #48368
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I 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 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.