• Resolved fivestudio

    (@fivestudio)


    hello

    we noticed yesterday that the search results for a partial query are incorrect.
    For example, we have records (WC products):
    1) РОСС RU.МТ02.E04997Р2
    2) РОСС RU.МТ02.E04997Р1
    3) РОСС IT.МТ22.E04997
    4) РОСС RU.МТ02.E04997П1

    The most convenient way for visitors to search is by part of the request, namely, by the service number, it is in the product header – 04997

    But when we enter it into the search on the site, we get instead of 4 options, only one – РОСС IT.МТ22.E04997, the rest for some reason is not looking.

    I reindexed the database, it didn’t help.

    It seems to me that the settings are correct. Screenshot of settings – https://b.radikal.ru/b12/2201/af/b1322bde967c.png

    Please help me with this issue.

    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)

    The problem here is that by default, Relevanssi does not match inside words, because in general, it causes lots of garbage results. Here, however, it is preventing the results you want to see.

    To enable inside-word matching, add this to your theme functions.php file:

    add_filter( 'relevanssi_fuzzy_query', 'rlv_partial_inside_words' );
    function rlv_partial_inside_words( $query ) {
    	return "(relevanssi.term LIKE '%#term#%')";
    }
    Thread Starter fivestudio

    (@fivestudio)

    Thank you. That helped

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘incorrect search’ is closed to new replies.