• Resolved deandid

    (@lcm404)


    Not sure if the problem I am having is the same as what’s explained here but hoping someone can shed some light here.

    https://wordpress.org/support/topic/typo-searches-bug-when-using-algolia-as-the-backend-search/

    – The autocomplete responds to config changes within Algolia.
    – However, very poor results are returned in WordPress that do not align with what I am seeing in the Algolia admin (for the same queries).
    – Examples, are searching for “soup” I get everything except soup (soap, superior, etc.) and searching for “noodles” returns zero results when there is plenty of soup and noodles on my site.
    – I then went into the Typo Tolerance section of the Algolia admin and tried to change it to min and then strict but none of these configs changed the results at all (however, these configs did impact the autocomplete).
    – I then just turned of Typo Tolerance and I get the exact same results as I did when it was enabled.
    – Note that I have not installed any plugins that would impact the search

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Richard Aber

    (@richaber)

    Howdy @lcm404

    The thread you reference is about a conflict with another plugin that modified the WP_Query object when a search was performed with the “Use Algolia in the backend” setting.

    If you are using the “Use Algolia in the backend” setting, and your theme, or one of your plugins, has some sort of custom search behavior, or behavior that modifies the WP_Query object during a PHP backed search, then it could be a similar conflict.

    WP Search with Algolia does not perform any configuration of typoTolerance settings. This means that both the Algolia indices created by the plugin, and the search clients (both PHP and JS), inherit the default typoTolerance setting of true.

    If you wish to modify that setting, there are multiple PHP filters available. If you use the autocomplete and instantsearch settings, then you can also copy the templates from the plugin and modify the JS to adjust the typoTolerance setting.

    I have written up a gist with more information about customizing typoTolerance:
    https://gist.github.com/richaber/0cff732a357d073779bb01cd02d8ceef

    Thread Starter deandid

    (@lcm404)

    Well, first of all, thank you for the Gist!

    Quick question while I am digging into this:

    The problem that I am having does not impact the auto-complete which works as expected.

    However, when I use either the instant search or “use Algolia in the backend” I am seeing either zero results or very poor results.

    This then points at the instantsearch.php being part of the problem but I have one question:

    Does the instantsearch also power the search when “use algolia in the backend” is selected? And, if not what file should I be looking at modifying (in regards to the gist you published)?

    Thanks again for your help.

    Thread Starter deandid

    (@lcm404)

    Found the issue! It wasn’t the theme but the demo data that was imported as apart of the theme. The theme came with Algolia autocomplete baked which made a change I followed up with the developer explaining the issue.

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Zero or Poor Results conflicting with Algolia Admin’ is closed to new replies.