How to check
LucaPescatoreParticipant3 years, 1 month ago #19131
Hello, I am trying to setup a Theme with WPSOLR and I would like to be sure that the Algolia index is used for the search and WP_Search is correctly used. How can I do that? The Theme seems doing a normal search and not in the Algolia Index.LucaPescatoreParticipant3 years, 1 month ago #19132
I investigated bit more
I noticed that fhe part where is searching in the data is the following:
$args = array(
‘tax_query’ => array($category,$job_salary,$title, $job_type,$job_category,$job_tags,$job_qualifications,$job_level,$job_skills,$job_experience,$job_currency,$job_shift,$job_class,$location,$location_keyword),
‘s’ => $title,
‘posts_per_page’ => get_option( ‘posts_per_page’ ),
‘post_type’ => ‘job_post’,
‘post_status’ => ‘publish’,
‘order’ => $order,
‘orderby’ => ‘date’,
‘paged’ => $paged,
‘meta_query’ => array(
‘key’ => ‘_job_status’,
‘value’ => ‘active’,
‘compare’ => ‘=’,
$args = nokri_wpml_show_all_posts_callback($args);
$results = new WP_Query( $args );
if ($results->found_posts > 0)
$message = __(‘Available Jobs’,’nokri’);
$message = __(‘No Jobs Matched’,’nokri’);
Seems that the WP_Query is searching in the database than the Algolia index.
Instead if I use the blog search I notice that the results are taken from Algolia.
What can be wrong? As I understand the WP_Query should get the data from Algolia instead the mysql database.
To check if the results are from Algolia or MySQL is because a specific keyword is only present in the Algolia index, therefore if the a single record is returned means that the data is retrieved from the Algolia index.
You must be logged in to reply to this topic.