Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • I don’t get the problem as soon as the Algolia Integration is disabled. Exactly, to me, it seems the Plugin returns a higher number of Results then there actually are.

    I’ve got the same issue when using the default pagination function.

    I’m using the main query in search.php with the setting: ”?Use Algolia with the native WordPress search template”

    I have the same issue with a standard query “/?s=test” in a custom theme. I do the Pagination like that:

    				echo paginate_links(array(
    					'base' => str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))),
    					'current' => max(1, $paged),
    					'show_all' => false,
    					'type' => 'list',
    					'end_size' => 2,
    					'mid_size' => 1,
    					'prev_next' => true,
    					'prev_text' => sprintf('<i></i> %1$s', __('&laquo; Vorherige Artikel', 'text-domain')),
    					'next_text' => sprintf('%1$s <i></i>', __('Weitere Artikel &raquo;', 'text-domain')),
    					'add_args' => false,
    					'add_fragment' => '',
    				));

    Based on the $wp_query->found_posts the number of pages should be right, but after some pages I get 404 errors.

    As the site is in development mode, we don’t have a public URL.

    Thread Starter reti97

    (@reti97)

    Alright, just found out that I can replace add_filter( 'algolia_post_shared_attributes', 'featured_image', 10, 2 ); with add_filter( 'algolia_searchable_post_shared_attributes', 'alg_excerpt', 10, 2 ); and it gets indexed in the searchable posts index.
    I’ve just checked, I’m now able to display the content in the frontend. So I’m able to display what I wanted.
    Thanks for your time and your help and have a nice day
    Reti

    Thread Starter reti97

    (@reti97)

    Alright, thank you, that helped me, I now found where the problem is. I think it would be quite easy to solve if I’d know how.
    I’ve seen in the script tag, that the returned results are from the “searchable posts” index.
    My custom attributes are just indexed in the “posts_post” and the “posts_page” index. Am I doing something wrong (wrong variable or something) in the function (the one from the first post)?

    Thread Starter reti97

    (@reti97)

    Hey Michael
    Thank you for your prompt reply. I believe your term for the populated javascript variables coming in is a good place to start. Where are these variables defined or rather, how do I define which variables I want to use? (Did I get that right, that these are the ones I can display in instantsearch.php?)

    The plugin should be on the latest Version (2.1.0).

Viewing 6 replies - 1 through 6 (of 6 total)