• I use “whole word” search option, and the results are correct. But in the result page, the excerpt generated by Relevanssi may still only contain a partial match.

    For example, if I search for “lx”, the generated excerpt maybe like this:

    … zxl …

    Pls visit my site wolfccb dot com and try to search “lx”. Hope it can be fixed in the future.

    Great plugin, thanks a lot, and happy new year!

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

    (@msaari)

    It’s because you’re using “characters” as the method of calculating the excerpt length. That does not make a difference between partial matching and whole word matching. Using “words” works.

    Because character-based excerpt length calculation is slow and generally not quite usable, I’m afraid I can’t change it to make it even slower. I understand why you’re using it because the word-based length does not produce nice results in Chinese text, but unfortunately, this isn’t something that can be helped.

    (As a side note, Relevanssi isn’t particularly great in Chinese. With phpjieba it’s somewhat better, but still not great.)

    Thread Starter wolfccb

    (@wolfccb)

    Thank you very much. IMHO, it would be very helpful to add an option about it, and allow us to choose if they want to trade off performance with accuracy.

    BTW, phpjieba seems to be designed to split Chinese words, which is indeed difficult. But splitting Chinese characters is much easier.

    Inspired by your reply, I tried to set Length of the snippet to 3 words. It will treat a Chinese paragraph as a word. This is slightly better with Chinese. Although I am still confused by the generated excerpt because sometimes the matched result appears in the start, and other times it is in the end. Anyway, I am using this now.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Request to fix an excerpt issue’ is closed to new replies.