• cheonmu

    (@cheonmu)


    hello. I’m running a website in Korean. Relevanssi works well, but I’ve noticed that a surprising number of people don’t use spaces between words.

    For example, I have several posts about “?? ??”. This is correct spelling and should always include a space, but people often search “????” without a space.

    Is there any way to make it recognize existing posts even if they don’t have spaces?

    Thanks.

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

    (@msaari)

    How could Relevanssi tell? Relevanssi doesn’t know Korean (or any other language); it only sees a string of characters. Relevanssi knows spaces separate words but cannot understand where two words are stuck together. Relevanssi would have to understand the language or at least have a list of words to do that.

    In a case like this, you could probably add a rule that Relevanssi always inserts a space before “??” (“weather”, right?), and if you have single cases that occur often, you can use synonyms to fix it.

    Thread Starter cheonmu

    (@cheonmu)

    It seems like there’s no way around it ;(

    solutions to this problem would be to create a big synonym dictionary, or use JS to modify the user’s query to the correct string for searching.

    I think either way is not simple things. thanks for letting me know!

    Plugin Author Mikko Saari

    (@msaari)

    You don’t need JS to modify the user query, there are PHP tools for that as well. You can use the pre_get_posts hook in WordPress or the relevanssi_modify_wp_query hook in Relevanssi. But yeah, it’s not simple, and that’s a big restriction for using Relevanssi with languages like Chinese and Japanese where spaces are generally not used.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there any way to make Relevanssi recognize when there are no spaces between w’ is closed to new replies.