• Hiya,

    I’ve just noticed that on my site (link below), when i search for two or more words say “text editors”, I get results back that don’t include this phrase… I’ve had a look through the settings and changed from the default ‘OR’ to ‘AND’ (and rebuilt the index) but no change in the results…

    Can I get Relevanssi to bring but search phrases instead of just single words?

    http://winingwp.com

    Thanks,
    Brin

    https://wordpress.org/plugins/relevanssi/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Brin Wilson

    (@brin)

    I.e. performing this search – http://winningwp.com/?s=text+editors – brings back 7 Search Results, however only the first result seems to contain the searched for term, i.e. “text editors”. The other results all highlight only “text” instead of the desired phrase “text editors” (which they don’t appear to contain). Best, Brin.

    Plugin Author Mikko Saari

    (@msaari)

    To search for phrases, you need to wrap the search terms in quotes. Like this: http://winningwp.com/?s=%22text+editors%22

    Looking at the site now, I only see one search results for ‘text editors’, seems to me you’ve got the AND operator in place, and the search is working as it should.

    If you use OR search, when you search for ‘text editors’, you get all results that match either ‘text’ or ‘editors’. That is the expected behaviour.

    Thread Starter Brin Wilson

    (@brin)

    Aha – I see now. I hadn’t realized users would need to use quotes to get matches. Incidentally, I’ve disabled the ‘OR’ search so shouldn’t it no longer be bringing back OR results? Best, Brin.

    Thread Starter Brin Wilson

    (@brin)

    P.s. I’ve just this second changed the fuzzy search options to only use fuzzy search when no other results are found – and it seems to be now behaving as i originally desired: i.e. with no need for the quotation marks to bring back exact matches…

    Plugin Author Mikko Saari

    (@msaari)

    Yes, disabling fuzzy search and using AND will result in more exact results.

    Quotes are only necessary for exact phrase matches, ie. those particular words in that particular order.

    Thread Starter Brin Wilson

    (@brin)

    I see. Thanks for all your help – much appreciated. Keep up the great work!

    [resolved]

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

The topic ‘exact matches’ is closed to new replies.