Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @msaari, I deactivated the S&F plugin and it worked correctly, so I knew it had to do something with the connection between Relevanssi and S&F. So after much trial and error, I finally figured out that it was the Force is_search to always be true? setting under the advanced settings of S&F. When I deactivated that, it started to work correctly. So all that to say, I am set now. Appreciate your recommendation as well as the quick response. ??

    Hi @msaari, I am running into the exact same issue where the page shouldn’t be displaying any posts and it displays all the posts instead. I have read over the above code recommendations and it still isn’t working for me. When I look at the MySQL query with Query Monitor, below is what I get returned.

    SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 500 + relevanssi.content * 1 + 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 = 'asdfasdf' 
    AND ( relevanssi.doc IN ( 
    
    SELECT DISTINCT(posts.ID) 
    FROM wp_posts AS posts 
    WHERE posts.post_type IN ('page', 'professors', 'conversations', 'sfwd-courses', 'groups') ) ) 
    AND ((relevanssi.doc IN (
    
    SELECT DISTINCT(posts.ID) 
    FROM wp_posts AS posts 
    WHERE posts.post_status IN ('publish'))) OR (doc = -1)) 
    ORDER BY tf DESC 
    LIMIT 500

    I also looked at how many rows the SELECT COUNT(DISTINCT...) queries have in the Query Monitor and both the first and second ones are at 0.

    I did some further code checking and ran this filter

    add_filter( 'relevanssi_results', 'rlv_check_results' );
    function rlv_check_results( $results ) {
        var_dump( $results );
        exit();
    }

    which returned array(0) { }

    And also checked this filter

    add_filter( 'relevanssi_modify_wp_query', 'rlv_check_parameters' );
    function rlv_check_parameters( $query ) {
        var_dump( $query-query_vars );
        exit();
    }

    which returned int(1), not sure if this is the correct response or not.

    I have tried to limit it down to only one post type, and it still doesn’t work correctly. I also deactivated Relevanssi and only used the Search and Filter Pro functionality and it worked correctly. So if you have any ideas or things I could try, any kind of help would be much appreciated!

    Thread Starter cgroot

    (@cgroot)

    @flabernardez – Just saw the plugin update come through with the group feature added onto it!! Really appreciate you guys adding that so quickly!! It works great!

    Thread Starter cgroot

    (@cgroot)

    Gotcha, okay! I appreciate you replying and letting me know! Yeah it’d be a very helpful feature to have and I look forward to maybe seeing it as a future improvement.

    Thanks and have a great day as well!

    Thread Starter cgroot

    (@cgroot)

    @rubengc
    @flabernardez

    • This reply was modified 3 years, 10 months ago by cgroot.
Viewing 5 replies - 1 through 5 (of 5 total)