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:
http://tswiackiewicz.github.io/inside-the-source-code/sphinxsearch/sphinxsearch-odmiana-wyrazen/
<http://tswiackiewicz.github.io/inside-the-source-code/sphinxsearch/sphinxsearch-odmiana-wyrazen/>
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 => "..."
Mind you, I’m not across what each of those transformations cover - and you may
want a more extensive set (as covered here:
https://yob.id.au/2008/05/08/thinking-sphinx-and-unicode.html
<https://yob.id.au/2008/05/08/thinking-sphinx-and-unicode.html>).
If this doesn’t help, though, do let me know!
—
Pat
> On 16 Sep 2019, at 7:03 pm, mikej <[email protected]> wrote:
>
> ŚRODOWISKA
>
> Many thanks,
>
> Mike
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/thinking-sphinx/37d87243-2763-4f43-8c56-ff18ff38c5cc%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/thinking-sphinx/0D5106A7-B943-497C-8426-F38024ADFF66%40freelancing-gods.com.