• calvinseng90

    (@calvinseng90)


    Hi,

    I have post titles that are for e.g.,
    Promat Building
    Promat Water System

    And I would like to force the searches to return 0 result if Promat was only keyed in. But 100% match returned if Promat Building was being keyed in. I tried increasing the weight on Post Title and also made sure that the default Operator set to AND – require all terms and also Disable the OR fallback.

    But when I search for Promat, all results with the keyword is still appearing.
    What can I do to force it to be exact 100% match?

    Thanks!

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

    (@msaari)

    You can’t, at least from Relevanssi settings. There’s no such setting, as it’s very rarely the result searchers want – usually people want to find results matching their search queries.

    Here are the instructions for adding a bonus for exact title matches. You can use that as a basis and change it so that unless there’s an exact match, the weight is set to zero. That should do the trick.

    Just remember to disable post content indexing as well, otherwise you’ll be seeing matches based on post content.

Viewing 1 replies (of 1 total)
  • The topic ‘Exact search for the whole Post Title’ is closed to new replies.