Posts from a specific category do not show up in search results
-
Hi, the posts in the category “Interviews en columns” are not showing up in search results.
You can see that category of posts here.
For instance, if I search for the latest post in that category by date with the word “Stimular” it is not showing up. If I remove the category it does show up.
I tried several things. With the debug button in the WordPress dashboard I can see that the post is in the database and that is indexed using the post id 125694
I also did some debugging as described in the knowledge base.
1) The post is also not showing in the admin search2) The parameters for the search are thiese. But I don’t see any strange things in there
array(69) { [“s”]=> string(8) “stimular” [“orderby”]=> string(4) “date” [“error”]=> string(0) “” [“m”]=> string(0) “” [“p”]=> int(0) [“post_parent”]=> string(0) “” [“subpost”]=> string(0) “” [“subpost_id”]=> string(0) “” [“attachment”]=> string(0) “” [“attachment_id”]=> int(0) [“name”]=> string(0) “” [“pagename”]=> string(0) “” [“page_id”]=> int(0) [“second”]=> string(0) “” [“minute”]=> string(0) “” [“hour”]=> string(0) “” [“day”]=> int(0) [“monthnum”]=> int(0) [“year”]=> int(0) [“w”]=> int(0) [“category_name”]=> string(0) “” [“tag”]=> string(0) “” [“cat”]=> string(3) “-13” [“tag_id”]=> string(0) “” [“author”]=> string(0) “” [“author_name”]=> string(0) “” [“feed”]=> string(0) “” [“tb”]=> string(0) “” [“paged”]=> int(0) [“meta_key”]=> string(0) “” [“meta_value”]=> string(0) “” [“preview”]=> string(0) “” [“sentence”]=> string(0) “” [“title”]=> string(0) “” [“fields”]=> string(0) “” [“menu_order”]=> string(0) “” [“embed”]=> string(0) “” [“category__in”]=> array(0) { } [“category__not_in”]=> array(0) { } [“category__and”]=> array(0) { } [“post__in”]=> array(0) { } [“post__not_in”]=> array(0) { } [“post_name__in”]=> array(0) { } [“tag__in”]=> array(0) { } [“tag__not_in”]=> array(0) { } [“tag__and”]=> array(0) { } [“tag_slug__in”]=> array(0) { } [“tag_slug__and”]=> array(0) { } [“post_parent__in”]=> array(0) { } [“post_parent__not_in”]=> array(0) { } [“author__in”]=> array(0) { } [“author__not_in”]=> array(0) { } [“search_columns”]=> array(0) { } [“ignore_sticky_posts”]=> bool(false) [“suppress_filters”]=> bool(false) [“cache_results”]=> bool(true) [“update_post_term_cache”]=> bool(true) [“update_menu_item_cache”]=> bool(false) [“lazy_load_term_meta”]=> bool(true) [“update_post_meta_cache”]=> bool(true) [“post_type”]=> string(3) “any” [“posts_per_page”]=> int(12) [“nopaging”]=> bool(false) [“comments_per_page”]=> string(2) “50” [“no_found_rows”]=> bool(false) [“search_terms_count”]=> int(1) [“search_terms”]=> array(1) { [0]=> string(8) “stimular” } [“search_orderby_title”]=> array(1) { [0]=> string(167) “wp_posts.post_title LIKE ‘{e04f52424ea6041e51dc6b012a309d8aa0d53fe88d3d505d79d8eb0f65a61c89}stimular{e04f52424ea6041e51dc6b012a309d8aa0d53fe88d3d505d79d8eb0f65a61c89}'” } [“order”]=> string(4) “DESC” }3) The database query is here. But also here I don’t see anything strange
string(3317) “SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 4 + relevanssi.comment * 1 + relevanssi.tag * 1 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf FROM wp_relevanssi AS relevanssi WHERE (relevanssi.term LIKE ‘stimular%’ OR relevanssi.term_reverse LIKE CONCAT(REVERSE(‘stimular’), ‘%’)) AND relevanssi.doc NOT IN ( SELECT DISTINCT(tr.object_id) FROM wp_term_relationships AS tr WHERE tr.term_taxonomy_id IN (13)) AND relevanssi.doc NOT IN (125595,107255,125590,125396,125365,125268,125189,125186,125144,125141,125091,125011,125000,124967,124832,124698,124641,124604,124601,124434,124300,124164,124088,124086,123953,123933,123871,123767,123757,123764,123374,123371,123190,123108,123054,123051,123048,123000,122997,122831,122777,122419,122311,122224,122092,122095,121951,121922,121866,121863,121672,121656,121198,121137,121134,121002,120903,120891,120796,120790,120786,120093,120007,119966,119885,119882,119574,119537,119313,119294,119044,118822,118540,118536,118160,117274,117269,117266,117225,117173,117116,117014,116940,116760,116764,116687,116653,116512,116490,116335,115937,115768,115710,115667,115578,115313,115094,115085,115082,114775,114761,114438,114435,114369,114119,114104,113846,113714,113537,113348,113345,113232,113059,112944,112864,112783,112523,111846,111517,111399,111291,111211,110985,110889,110607,110503,110265,110099,109920,109913,109898,109656,109530,109170,108935,108887,108760,108484,108204,108178,108153,108007,107923,107909,107731,107720,107544,107535,107533,107484,107413,107299,107239,107217,107213,107173,106857,106552,106540,106521,105583,105569,105310,105109,105030,104677,104431,104115,103487,103485,103437,103198,102899,102896,102849,102846,102841,102376,102187,102184,102174,102176,101766,101680,100854,100453,100180,100143,100126,99778,99775,99409,99284,98819,98424,97591,96833,96606,96577,96413,87852,96207,96151,96083,96071,95164,95020,94853,94527,93493,93296,92900,92211,91975,91535,90888,90404,90389,90141,89664,89485,89124,88937,88911,88656,88567,88418,88107,88039,87843,87634,87429,87435,53100,46433,52647,56896,87301,87297,87293,86753,86757,86736,86521,86330,86288,86189,86000,85953,85739,85549,85537,85229,84949,84381,84246,84086,83622,83565,82812,82536,82125,80849,80484,80088,79646,79638,79345,79341,79181,79177,77895,77200,77155,77072,77026,76881,76682,76573,76569,76363,76268,76262,76215,76097,76028,75959,75800,75435,75228,74945,74319,74315,74259,74074,40893,48187,41895,37391,73381,73317,73314,72960,72943,72904,72589,72461,72178,55515,71858,71854,71812,71388,71386,71281,71046,70927,70678,70268,70181,70083,69974,69743,69637,69571,68824,68613,68389,68356,67806,67803,67626,67222,67143,66903,66900,53887,42899,54797,52620,66824,66811,52569,66802,66800,66628,53890,66526,66144,66140,66021,42706,49190,53887,64363,65925,65918,52753,65885,65629,65203,50050,55235,55086,31505,65030,64901,53890,64486,64396,64363,64352,63485,63258,63189,62263,62179,57303,48993,44937,58714,59155,59158,59579,59739,60151,60818,61385,61452,61969) AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM wp_posts AS posts WHERE posts.post_type NOT IN (‘event’))) OR (doc = -1)) ORDER BY tf DESC LIMIT 500”Some final notes
4) I checked the advanced settings. The category is not excluded. There is not any category excluded
5) There are some additional hooks running in functions.php (see below). I removed those temporarily to see if that made a difference.
But no that did not help/* HH Modify Relevanssi query – remove quotation marks
See https://www.ads-software.com/support/topic/search-with-quotation-marks-is-slow/#post-17169096
*/
add_filter( ‘relevanssi_modify_wp_query’, function( $q ) {
$q->set( ‘s’, str_replace( ‘”‘, ”, $q->query_vars[‘s’] ) );
return $q;
} );// https://www.relevanssi.com/knowledge-base/wp-job-manager/
add_action( ‘get_job_listings_init’, ‘relevanssi_fix_for_wp_job_manager’ );
function relevanssi_fix_for_wp_job_manager(){
remove_filter( ‘posts_request’, ‘relevanssi_prevent_default_request’ );
remove_filter( ‘the_posts’, ‘relevanssi_query’ );
}To make a long story short. Can you see why the posts in that category do not show up in search results?
And what can I do to make them show up?
Thanks for looking into this.
many greetings, HanThe page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.