• Resolved Marta z ER-HA Rowery

    (@marta666)


    Hello,

    I have enabled showing archive pages – categories and tags. unfortunately they show up in the results list even though they contain stop words. Additionally I have %s% search turned on and there is a problem with instant search sorting.

    Example Stop word: “rowerowe”, I type “rower” (bike) and category “Tarcze i zebatki rowerowe” shows up. I believe results that start with “rower” should appear first, but I don’t see any logic to sort the results by best match. However, I have categories such as “City bikes “Rowery miejskie” and they should be shown first, but they are not listed.

    Thank you for your help 🙂

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    So speaking about your example – to exclude category “Tarcze i zebatki rowerowe” when searching for ‘rower’ you need to add word ‘rower’ to the stop list option and re-index plugin table. Stop words option works for words inside users search query, not for words inside product/category.

    Regards

    Thread Starter Marta z ER-HA Rowery

    (@marta666)

    I understand, but I can’t do that 🙂 How does sorting work? Why are “Spot Bikes “Rowery miejskie” not listed first?

    Plugin Author ILLID

    (@mihail-barinov)

    Well plugin sort results depending on where the search word is in relation to each product ( title, content, … ) and also depending on the number of repetitions of these words.

    In your case what can be done is to add a more relevance score for words inside the product title.

    Please use following code snippet:

    add_filter('aws_relevance_scores', 'my_aws_relevance_scores');
    function my_aws_relevance_scores( $relevance_array ) {
        $relevance_array['title'] = 700;
        return $relevance_array;
    }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

    Also, after adding this code you will need to go to the plugin settings page and click the ‘Clear cache’ button.

    Regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Stop words and instant search sorting categories and tags’ is closed to new replies.