Support » Plugin: Relevanssi - A Better Search » Synonym help

  • Resolved deadhippo

    (@deadhippo)


    I’m trying out the synonym function but I can’t seem to get it to work. Can someone tell me what I am doing wrong?

    I tried this originally

    whale = whales

    and then

    whales = whale

    and then

    'whale = whales'
    'whales = whale'
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Do you have OR operator enabled?

    No. I have the AND operator enabled because I have the post date as the default order for the dates. I know that this is not how you imagined people using your search but I have good reasons. In my site the latest posts are the most relevant in most cases because the older posts are older products and may be sold out or discontinued.

    And also don’t want the results for “star” showing up when people search “star wars”, even if all the star wars posts appear first.

    I guess from your question though that I won’t be able to use the synonym function with my current settings.

    Plugin Author Mikko Saari

    (@msaari)

    Yes, synonym function only works with OR queries (it turns “whale” to “whale OR whales”).

    You don’t have to use AND when you order by post date, those two are not connected. However, using AND is generally a good idea that leads to better results than OR search, as you’ve noticed.

    Supporting synonyms with AND operator would require more complex search logic which I haven’t felt necessary to build so far. It’s complicated and only useful in limited cases.

    No worries. I guess I’ll just add plurals to the tags. Thanks.

    whiteorb

    (@whiteorb)

    So what is the proper format?

    whale = whales
    whales = whale
    ‘whale = whales’
    ‘whales = whale’

    Are they comma separated?

    Plugin Author Mikko Saari

    (@msaari)

    No apostrophes or commas, just one synonym pair per line.

    whiteorb

    (@whiteorb)

    So whales = whale or whales=whale

    Plugin Author Mikko Saari

    (@msaari)

    Both work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Synonym help’ is closed to new replies.