Support » Plugin: Relevanssi - A Better Search » No Search Results found after installing Relevanssi

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Please follow the steps described in this post and let me know what kind of results the first two steps produce.

    Thanks so much for the reply it is very appreciated

    When I tried

    Look at the parameters Relevanssi is getting

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

    This is what I got

    array(65) { ["s"]=> bool(false) ["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) "" ["static"]=> 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(0) "" ["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(801) { [0]=> string(1) "2" [1]=> string(2) "12" [2]=> string(3) "285" [3]=> string(3) "334" [4]=> string(3) "353" [5]=> string(3) "441" [6]=> string(3) "491" [7]=> string(3) "511" [8]=> string(3) "516" [9]=> string(3) "701" [10]=> string(3) "713" [11]=> string(3) "718" [12]=> string(3) "723" [13]=> string(3) "730" [14]=> string(3) "812" [15]=> string(4) "1129" [16]=> string(4) "1192" [17]=> string(4) "1286" [18]=> string(4) "1289" [19]=> string(4) "1294" [20]=> string(4) "1298" [21]=> string(4) "1394" [22]=> string(4) "1581" [23]=> string(4) "1588" [24]=> string(4) "1625" [25]=> string(4) "1653" [26]=> string(4) "1657" [27]=> string(4) "1660" [28]=> string(4) "1706" [29]=> string(4) "1723" [30]=> string(4) "1733" [31]=> string(4) "1743" [32]=> string(4) "1747" [33]=> string(4) "1748" [34]=> string(4) "1750" [35]=> string(4) "1755" [36]=> string(4) "1759" [37]=> string(4) "1761" [38]=> string(4) "1763" [39]=> string(4) "1766" [40]=> string(4) "1768" [41]=> string(4) "1770" [42]=> string(4) "1772" [43]=> string(4) "1778" [44]=> string(4) "1793" [45]=> string(4) "1798" [46]=> string(4) "1808" [47]=> string(4) "1838" [48]=> string(4) "1850" [49]=> string(4) "1862" [50]=> string(4) "1873" [51]=> string(4) "1875" [52]=> string(4) "1905" [53]=> string(4) "1937" [54]=> string(4) "1958" [55]=> string(4) "1959" [56]=> string(4) "1960" [57]=> string(4) "1961" [58]=> string(4) "1964" [59]=> string(4) "1965" [60]=> string(4) "2012" [61]=> string(4) "2013" [62]=> string(4) "2017" [63]=> string(4) "2198" [64]=> string(4) "2199" [65]=> string(4) "2200" [66]=> string(4) "2201" [67]=> string(4) "2203" [68]=> string(4) "2207" [69]=> string(4) "2210" [70]=> string(4) "2211" [71]=> string(4) "2214" [72]=> string(4) "2221" [73]=> string(4) "2222" [74]=> string(4) "2223" [75]=> string(4) "2224" [76]=> string(4) "2227" [77]=> string(4) "2228" [78]=> string(4) "2230" [79]=> string(4) "2231" [80]=> string(4) "2234" [81]=> string(4) "2235" [82]=> string(4) "2237" [83]=> string(4) "2238" [84]=> string(4) "2240" [85]=> string(4) "2242" [86]=> string(4) "2244" [87]=> string(4) "2247" [88]=> string(4) "2250" [89]=> string(4) "2252" [90]=> string(4) "2254" [91]=> string(4) "2260" [92]=> string(4) "2263" [93]=> string(4) "2266" [94]=> string(4) "2267" [95]=> string(4) "2792" [96]=> string(4) "2794" [97]=> string(4) "2806" [98]=> string(4) "2862" [99]=> string(4) "2898" [100]=> string(4) "2899" [101]=> string(4) "2900" [102]=> string(4) "2902" [103]=> string(4) "2903" [104]=> string(4) "2904" [105]=> string(4) "2905" [106]=> string(4) "2906" [107]=> string(4) "2907" [108]=> string(4) "2908" [109]=> string(4) "2909" [110]=> string(4) "2910" [111]=> string(4) "2911" [112]=> string(4) "2912" [113]=> string(4) "2913" [114]=> string(4) "2914" [115]=> string(4) "2952" [116]=> string(4) "2953" [117]=> string(4) "2954" [118]=> string(4) "2957" [119]=> string(4) "2958" [120]=> string(4) "2972" [121]=> string(4) "2973" [122]=> string(4) "2974" [123]=> string(4) "2975" [124]=> string(4) "2976" [125]=> string(4) "2977" [126]=> string(4) "2980" [127]=> string(4) "2988" [128]=> string(4) "2990" [129]=> string(4) "2991" [130]=> string(4) "2992" [131]=> string(4) "2993" [132]=> string(4) "2994" [133]=> string(4) "2995" [134]=> string(4) "2996" [135]=> string(4) "3001" [136]=> string(4) "3002" [137]=> string(4) "3003" [138]=> string(4) "3004" [139]=> string(4) "3005" [140]=> string(4) "3006" [141]=> string(4) "3007" [142]=> string(4) "3008" [143]=> string(4) "3009" [144]=> string(4) "3011" [145]=> string(4) "3012" [146]=> string(4) "3013" [147]=> string(4) "3014" [148]=> string(4) "3015" [149]=> string(4) "3016" [150]=> string(4) "3018" [151]=> string(4) "3035" [152]=> string(4) "3036" [153]=> string(4) "3039" [154]=> string(4) "3040" [155]=> string(4) "3041" [156]=> string(4) "3042" [157]=> string(4) "3043" [158]=> string(4) "3044" [159]=> string(4) "3045" [160]=> string(4) "3046" [161]=> string(4) "3047" [162]=> string(4) "3048" [163]=> string(4) "3049" [164]=> string(4) "3051" [165]=> string(4) "3052" [166]=> string(4) "3053" [167]=> string(4)

    It actually goes on from there, I cut it short.

    When I tried Look at the MySQL query

    I got

    string(701) "SELECT DISTINCT(relevanssi.doc), relevanssi.*, relevanssi.title * 5 + relevanssi.content * 1 + relevanssi.comment * 0.75 + relevanssi.tag * 1 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 1 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf FROM ekw_relevanssi AS relevanssi WHERE relevanssi.term = 'wordpresss' AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM ekw_posts AS posts WHERE posts.post_type NOT IN ('revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'clients', 'testimonials', 'wpcf7_contact_form', 'thirstylink'))) OR (doc = -1)) ORDER BY tf DESC LIMIT 500"

    When I tried Look at the results

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

    I got

    array(0) { }

    Not sure exactly what this means.

    Any suggestions? Thanks Again!

    Plugin Author Mikko Saari

    (@msaari)

    Ah, that’s Betheme. Sorry, didn’t connect this at first. Betheme is one of the weirdest themes I’ve ever seen, it completely destroys the search, just for fun. There’s a function in the theme called mfn_search() that just eliminates the search term completely, wrecking the whole search.

    The fix is fortunately simple. Just add the following to your theme functions.php to eliminate that behaviour:

    function mfn_search() {
    }

    That’s all it takes.

    Fantastic! Thanks!

    That got it solved.

    I really appreciate the help and I learned a little more about WordPress at a lower level.

    Thanks! — Steven

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No Search Results found after installing Relevanssi’ is closed to new replies.