• Resolved gleenk

    (@gleenk)


    We have finally activated the plugin and indexed all the data. A few minutes after the indexing is completed, the plugin stops providing results, and although everything appears correct in Algolia, we keep getting ‘No results’ from the autocomplete in the search box. However, the results do show up on the results page. It seems there is an issue with the autocomplete. What can we do?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are there potentially any javascript/console errors going on? Do you have a link where we could see and try things out ourselves?

    Thread Starter gleenk

    (@gleenk)

    We have console.log error but caused by adv, not by website directly (so we can’t do anything on that). Check out this link (it’s production website so please tell me when you finished):
    https://www.tempi.it/

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not quite sure what may be going on, as my browser console is showing results coming in via XHR requests.

    Have you done any customizations of the Autocomplete setup, outside of just enabling as a whole?

    Thread Starter gleenk

    (@gleenk)

    no customization of any kind, just enabled. Curious fact. As long as Algolia was indexing the data, it worked, but after it finished, it stopped working

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Based on what I’m seeing, your Autocomplete configuration is set to use “All Posts”, but it doesn’t explain why you’re getting the no results messaging.

    Thread Starter gleenk

    (@gleenk)

    This is the settings. Everything on algolia website works fine (search etc in algolia dashboard). Probably there’s a huge number of posts? (60k)? But why it’s not working at all?

    Thread Starter gleenk

    (@gleenk)

    I’ve probably found the issue. This error appears on Algolia despite the logo being present in the autocomplete. Should the logo also be added to the search results?:

    The Algolia Build plan is your Search & Discovery playground. It’s not intended for production projects.

    If your project is live, you’ll need to display the Algolia Logo next to the search results or upgrade to the Algolia Grow plan.

    Now we added logo in search results but nothing changed. can you make a check on your plugin?

    • This reply was modified 1 month ago by gleenk.
    • This reply was modified 1 month ago by gleenk.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The logo display shouldn’t be affecting results at all. I’m not sure what’s going on or why it’s happening because I see results in the XHR requests as I mentioned earlier. Not really anything I can think of to poke at as this would be the Autocomplete library itself, which we don’t manage.

    Thread Starter gleenk

    (@gleenk)

    So, what can we do now? We reached out to the Algolia support team, but they told us to contact you.

    Hypothesis: Are there any strange characters breaking autocomplete.js?

    • This reply was modified 1 month ago by gleenk.
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I wish I had a better answer, but at the moment, I’m not sure. Do you have a staging copy of the install that you could try things out on, including reducing down other active plugins as much as able, and perhaps using a default theme? The idea here being eliminate as much possible conflicts could be coming in, and if it starts working again, start turning things back on until the issue is re-introduced.

    Are there any strange characters breaking autocomplete.js?

    I won’t say no, but I can’t say for certain yes either, without being able to do some trial/error.

    Thread Starter gleenk

    (@gleenk)

    I don’t think there are any issues with the theme, it’s a custom theme, made by us, with no particular functionalities. As for the plugins, we can try selectively, but the problem is that, having so many records, the search queries skyrocket and block our license.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure what to suggest beyond that. Getting things to as little variables as possible is the idea.

    How many plugins are in play here?

    Thread Starter gleenk

    (@gleenk)

    Algolia says there is some technical issue related to the fact that the search queries are so high, even though only a few have actually been made. Are we sure that queries are not being triggered for every character typed? Is it possible to avoid this and trigger the request after a delay, once at least 3 or 4 characters have been typed?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    There’s some code examples over at https://github.com/WebDevStudios/wp-search-with-algolia/issues/398

    This example below just modifies the autocomplete.php template directly, which you can see more about at https://github.com/WebDevStudios/wp-search-with-algolia/wiki/Customize-the-Autocomplete-dropdown

    source: algoliaHitsSource( client.initIndex( config[ 'index_name' ] ), {
    hitsPerPage: config[ 'max_suggestions' ],
    attributesToSnippet: [
    'content:10'
    ],
    highlightPreTag: '__ais-highlight__',
    highlightPostTag: '__/ais-highlight__'
    } ),
    debounce: 2500,
    templates: { ... }

    Something like above would delay execution by 2500ms and this 1 line addition would be for around this spot https://github.com/WebDevStudios/wp-search-with-algolia/blob/2.8.1/templates/autocomplete.php#L109-L117 which I pasted some of above.

    Thread Starter gleenk

    (@gleenk)

    We’ll make a try hardcoding it but, can you then provide an option to do that in your plugin options page?

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.