Hi Mike,
Sorry for not getting back to you on this promptly.
Here’s the code I’ve been testing with (within the TS test suite):
Article.create! :title => "ochrona środowiska"
index
search = Article.search("środowiska")
search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
expect(search.first.excerpts.title).
to eq(%q{ochrona <span class="match">środowiska</span>}And, when I first ran it, it didn’t pass:
Failure/Error:
expect(search.first.excerpts.title).
to eq(%q{ochrona <span class="match">środowiska</span>})
expected: "ochrona <span class=\"match\">środowiska</span>"
got: "ochrona ś<span class=\"match\">rodowiska</span>”As you may notice, it’s the leading ś that doesn’t get matched correctly.
I tested this against Sphinx 2.2.11, 3.1.1, and Manticore 3.1.2, all failed. Then I did a bit of searching, and came across this post:
I can’t read Polish, but I took the suggested charset_table settings and added them to my Article index, and the test passes. So perhaps that’s worth adding to your app’s config? Either in config/thinking-sphinx.yml or on a per-index basis with set_property :charset_table => "..."
If this doesn’t help, though, do let me know!
—
Pat