• Resolved hanheg

    (@hanheg)


    Hi, on this site the search works reasonably fast with over 24k articles. Except when a user searches for terms within quotation marks.
    For example, if I search for:
    sustainable company
    that goes reasonably quick.
    But if I search for
    “sustainble company”
    it’s really slow or gives no results at all.
    It even seems to overload/crash the server now and than

    We turned off the “or” fallback and the custom excerpts. But that does not help. Is there anythings we can do to about this?

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

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

    (@msaari)

    Not really. Doing a phrase search is much, much slower, as the database server has to look inside every post, and that’s very, very slow on a big site like yours.

    You can add this function to your site to disable the feature:

    add_filter( 'relevanssi_modify_wp_query', function( $q ) {
        $q->set( 's', str_replace( '"', '', $q->query_vars['s'] ) );
        return $q;
    } );
    Thread Starter hanheg

    (@hanheg)

    Thank you for your quick response. Amazing ??
    I gave it a try and now the search is a lot quicker.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search with quotation marks is slow’ is closed to new replies.