Support » Plugin: Relevanssi - A Better Search » “It’s” in search

  • I have relevannssi installed. Even with the latest update the issue is not fixed…

    When I type in the serach “It’s” I get “nothing found” and the searchbox is filled with “It%27s”

    I have several posts where the title stats with “It’s”. Any idea what this could be and how to fix it?

    • This topic was modified 2 weeks, 2 days ago by check2020de.
    • This topic was modified 2 weeks, 2 days ago by check2020de.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari


    That’s not a bug, that’s a feature. With the default settings, that search term boils down to nothing. Relevanssi replaces the apostrophe with a space, leaving “it s”, and since the minimum word length for Relevanssi indexing is three characters, that will find nothing. Also, if your site is in English, “it” is a stopword and not indexed.

    Usually in the case of English-language sites, “It’s” is a really useless search term that will find way too many posts, so I wouldn’t worry about it too much. If it is unusually significant for some reason, then it’s possibly to adjust the way Relevanssi handles apostrophes and the minimum word length (see “Advanced indexing settings” in Relevanssi indexing settings) and remove the word “it” from the stopword list, but in most cases it’s not worth the trouble. The cases where someone needs to search for “it’s” specifically are fairly rare.

    With Relevanssi Premium, there are different stopword lists for post content and everything else, so with that you can have “it” as a stopword for psot content, but not for titles; that’s more helpful.

    As for the search box, your theme is doing some over-eager escaping there, %27 is the URL escaping for an apostrophe, but with correct escaping should not show up in the search box.

    Ok, got it. Thanks for the tip with premium!

    Sure, nobody searches for It’s… but maybe for an entire headline which contains an ‘

    Do you have any tip for me how to stop the over-eager escaping of my theme (Alante)? …or a tip for what I have to seach in my theme?


    Plugin Author Mikko Saari


    In general the apostrophes are not a problem. If there’s a long word with an apostrophe, there’s no problem searching for the word, the only problem is with these small words that are generally unimportant.

    I tried installing Alante on my test site, and there wasn’t any problems with the escaping. So I can’t tell what’s up with that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.