• Hello.

    My logs are absolutely full of {search_term_string}/some-random-category-permalink/

    It has made my logs unreadable. Strangely, this wasn’t happening until maybe a week after installing it on my new website. It worked fine on the old one, although this query still showed up regularly. But at the moment everything in the log is this query structure.

    Do you have any idea what this is? Thanks.

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

    (@msaari)

    Probably some bots messing around. Relevanssi doesn’t come up with these by itself; someone or something is running that search. Perhaps your server access logs will give you some idea what it is, and if it’s a bot with a constant user-agent string, you can use relevanssi_bots_to_not_log filter to block it from the logs.

    Thread Starter npacademy

    (@npacademy)

    Hmm, I have no idea how to do that really.

    Also, I have a more pressing problem that the search results don’t appear relevant really.

    For example, look at this: https://www.naturettl.com/?s=sharpen

    For some reason, the article with ‘sharpen’ in the title is about 10 articles down the list?!

    Plugin Author Mikko Saari

    (@msaari)

    Those results are not ordered by relevance. That’s fairly easy to see – the first post has the word “sharpen” just once in the post content. Also, trying to change the order with the orderby parameter has no effect.

    The results seem to be provided by Relevanssi, as they do respond to some Relevanssi-specific search parameters. Are you perhaps using some kind of post order plugin (for example Intuitive Custom Post Order)? Those can mess with Relevanssi results. Here’s how you fix that.

    Thread Starter npacademy

    (@npacademy)

    Hi again. I’ve added that code, but it is still a problem.

    The only order plugin we use is ‘WordPress Popular Posts’.

    Thread Starter npacademy

    (@npacademy)

    Disabling relevanssi, the results do not change.

    Plugin Author Mikko Saari

    (@msaari)

    Can you show me your search results template?

    Thread Starter npacademy

    (@npacademy)

    Hi Mikko. Sorry for my slow response. This is the search.php file – any help would be appreciated. Thanks.

    https://pastebin.com/AQnCg93N

    Plugin Author Mikko Saari

    (@msaari)

    echo do_shortcode('[ajax_load_more repeater="template_1" images_loaded="true" post_type="post" search="'.$term.'" scroll="false" button_label="Load More" container_type="div" posts_per_page="12"]');

    This loads the search results and while I can’t see how exactly it does it, it does drop Relevanssi out. That’s why you’re not seeing results from Relevanssi.

    There’s probably no way to fix this, or it is very complicated, so if you want to keep this theme and this way to display the search results, you can’t unfortunately use Relevanssi.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘{search_term_string} problem’ is closed to new replies.