WordPress.org

Support

Support » Plugins and Hacks » Relevanssi - A Better Search » [Plugin: Relevanssi – A Better Search] Encoding issue when add space to an Arabic word

[Plugin: Relevanssi – A Better Search] Encoding issue when add space to an Arabic word

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

    @msaari

    Relevanssi does already trim the search phrase, so that’s not going to help.

    Hmm, when I search for a word followed by a space, a plus sign gets added to the URL:
    http://domain.com/?s=word+
    vs
    http://domain.com/?s=word
    Doesn’t that mean that the space gets included with the search phrase? Also, the space doesn’t get removed after clicking on the search button. Although it refreshes the page returning the results.. the space remains in the search field.

    Plugin Author Mikko Saari

    @msaari

    Hmm, at least internally the space is removed. You can try removing the space even before the query is passed to Relevanssi.

    As I told you in the first post, everything is okay when I search for the same word without a space at the end. It is also fine when I manually remove the plus sign from the URL.

    Something strange happens when adding the space, also:
    Without a space: http://grab.by/aXuS
    With a space at the end: http://grab.by/aXuR

    Plugin Author Mikko Saari

    @msaari

    Well, beats me. Like I said – try writing a function that strips the space before the query is passed to Relevanssi, maybe that helps.

    Could you please do that for me? I am still learning, and I don’t have the skills yet…

    Well. Just figured out it’s an issue with the theme I’m using, which is Gantry. I actually found that Relevanssi does nothing, and changing its options/building the index has no effect at all. The theme seems to have an advanced search capabilities that are built inside, with support for marking search words in the results. However, it wasn’t made in the WP way at all.. it feels hacky. While I think I won’t use it in any later projects, it’s too late for such a decision now!

    Well.. was just sharing my thoughts. I know, I’m talking too much 😛 Anyway, thanks for your time 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Encoding issue when add space to an Arabic word’ is closed to new replies.
Skip to toolbar