Good day, I created a clean Drupal installation and a set of Search API, Search API Database, Entity, Ctools, Views modules.
Then created 2 nodes with the following content:

  1. Comrades! the further development of various forms of activity entails the process of introduction and modernization of new proposals. Similarly, the scope and location of training allows for an assessment of the importance of significant financial and administrative conditions. The importance of these problems is so obvious that the beginning of the daily work on the formation of the position entails the process of implementation and modernization of the development model. Daily practice shows that the strengthening and development of the structure plays an important role in the formation of the training system, meets the urgent needs.
  2. Товарищи! дальнейшее развитие различных форм деятельности влечет за собой процесс внедрения и модернизации новых предложений. Равным образом рамки и место обучения кадров позволяет оценить значение существенных финансовых и административных условий. Значимость этих проблем настолько очевидна, что начало повседневной работы по формированию позиции влечет за собой процесс внедрения и модернизации модели развития. Повседневная практика показывает, что укрепление и развитие структуры играет важную роль в формировании системы обучения кадров, соответствует насущным потребностям.

Next, you create a search server and an index, and you create an index search view with the output as the result of excerpt

But no matter how I tried to set up in most cases excerpt Russian content is not the one, and in principle without the desired word

alt

alt

Then content in English all working like a charm. What could be the problem?

Comments

strelkovandreyvalerievich’s picture

Issue summary: View changes
strelkovandreyvalerievich’s picture

Issue summary: View changes
drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new7.39 KB

Probably there’s some bug with multi-byte characters. Unfortunately, our test coverage is pretty poor in D7, so a) it’s easily possible this slipped through, and b) it’s unfortunately not that easy to fix, as we can’t be certain we won’t break something else. (I.e., the handling of single-byte character strings that currently works fine.)
However, since we did a much better job in D8, maybe just backporting that will do the trick? Patch attached, please try it out!

If that doesn’t work, we might need to include the changes in #2979316: Highlighted word now always visible in excerpt – which would complicate things somewhat, though.

strelkovandreyvalerievich’s picture

Sorry for the long answer, but now again made a clean install and surprisingly now everything works. Just can not understand what has changed, like you have a new version, but judging by the proposed patch in the new version there are no such changes. But not the essence, the main thing that now it works! Thanks for the great module!

UPDATE!
My mistake, I forget activate search partial words, and problem reproduce again,
but now I apply your patch now search in partial!!!

When search: проб

... условий. Значимость этих проблем настолько очевидна, что ...

Moreover, the module https://www.drupal.org/project/rustemmer has become even better to work and find results

  • drunken monkey committed 27b6cbb on 7.x-1.x
    Issue #2990940 by drunken monkey: Fixed multi-byte handling of Highlight...
drunken monkey’s picture

Status: Needs review » Fixed

Alright, great to hear! Thanks for testing, and no worries about the delay. No rush. ;)
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.