Skip to content

Highlight with unexpected results #526

@doppelrittberger

Description

@doppelrittberger

Hey

I use your cool library for fulltext search and tried using the highlight feature. Seems working mostly fine but I found some examples which I cannot explain.

I created a test here:
flexsearch.html

If you run this you will see it searches for start of german word "urlaub" (vacation) and the first highlight is perfect:
Be<b class='xyz'>urlau</b>bung.
The second highlight instead appears to be wrong:
auf-<b class='xyz'>beurl</b>aubung

I would expect the second highlight like this:
auf-be<b class='xyz'>urlau</b>bung

Is there any chance you could give me a hint about what I'm doing wrong?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions