• Resolved micahjsharp

    (@micahjsharp)


    Hi, I have a vague memory of something like this happening before, but I don’t recall the solution. When you search in our Knowledge Base, the live results are showing items that are not KB articles, and are actually the same live results that Algolia produces. If you hit enter or click the Search button, only Basepress KB articles show up as results, but the live results include everything. Any suggestions on how to avoid that? I did long ago fix a case where the actual results after hitting the search button were accurate, but the “found” count was inflated, appearing to also include Algolia found results. I fixed that with some code I found in the support forum for something else as follows below. Doesn’t fix this current live results problem however:

    add_filter( 'algolia_should_filter_query', function( $should_filter ){
        global $basepress_utils;
    
        if( ! empty( $basepress_utils ) ){
            if( $basepress_utils->is_search || $basepress_utils->is_global_search ){
                $should_filter = false;
            }
        }
        return $should_filter;
    } );

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author BasePress

    (@codesavory)

    Unfortunately, we do not have a solution to this as Algolia search compatibility and integration are not tested yet with this plugin.

    This would perhaps require custom coding at your end.

Viewing 1 replies (of 1 total)
  • The topic ‘Live search results include non KB articles’ is closed to new replies.