What's the contents of your config/thinking_sphinx.yml file, if it exists? Most
importantly, do you have a charset_table value that covers these UTF-8
characters?
--
Pat
On 01/04/2013, at 4:53 AM, hipertracker wrote:
> Now encoding is fine, but still excerpts does not match UTF-8 based words.
> Only words without UTF-8 characters are matched
>
> rs = VersePl.search('pozdrawia && łukasz && lekarz')
> rs.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
> puts rs.first.excerpts.text
> # => <span class="match">Pozdrawia</span> was Łukasz, umiłowany <span
> class="match">lekarz</span>, i Demas.
>
> --
> JZ
>
> On Sunday, March 31, 2013 2:25:50 PM UTC+1, Pat Allan wrote:
> Just fixed this with commit 87e22abd7e - Sphinx isn't very good at responding
> with UTF-8, but it's easy enough to work around with Ruby 1.9 encodings,
> thankfully.
> --
> Pat
>
> On 01/04/2013, at 12:15 AM, hipertracker wrote:
>
> > er, It should be "It still does not work with UTF-8 characters."
> >
> > I've just checked it for MySQL and PostgreSQL. All UTF-8 characters
> > returned from excertps.fieldname method are corrupted.
> >
> > --
> > JZ
> >
> > On Sunday, March 31, 2013 1:01:07 PM UTC+1, hipertracker wrote:
> > I can see excerpts method now, but it still does work with UTF-8 characters.
> >
> > rs = VersePl.search('pozdrawia && łukasz')
> > rs.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
> > puts rs.first.text # that's correct:
> > # => Pozdrawia was Łukasz, lekarz miły i Demas.
> >
> > puts rs.first.excerpts.text
> > <span class="match">Pozdrawia</span> was Šukasz, lekarz miły i Demas.
> >
> > It matches only non-UTF-8 words and all UTF-8 characters are corrupted.
> >
> > --
> > JZ
> >
> > On Saturday, March 30, 2013 11:53:27 PM UTC, Pat Allan wrote:
> > That's a bug - and I've just fixed it now. If you use the following in your
> > Gemfile, it should work fine:
> > gem 'thinking-sphinx', '~> 3.0.2',
> > :git => 'git://github.com/pat/thinking-sphinx.git',
> > :ref => 'b50e7d3f4c'
> >
> > --
> > Pat
> >
> > On 31/03/2013, at 10:44 AM, hipertracker wrote:
> >
> > > But when I repeat that with a1 different phrase I have a side effect.
> > > search.context[:panes] array is groving with every new search. Is it
> > > intentional or an error?
> > >
> > > search = MyModel.search 'phrase2'
> > > search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
> > > p search.context[:panes]
> > > # => [ThinkingSphinx::Panes::ExcerptsPane,
> > > ThinkingSphinx::Panes::ExcerptsPane]
> > > search = MyModel.search 'phrase3'
> > > search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
> > > p search.context[:panes]
> > > # => [ThinkingSphinx::Panes::ExcerptsPane,
> > > ThinkingSphinx::Panes::ExcerptsPane, ThinkingSphinx::Panes::ExcerptsPane]
> > >
> > > --
> > > JZ
> > >
> > > On Saturday, March 30, 2013 2:46:09 AM UTC, Pat Allan wrote:
> > > I've actually been working on updating documentation for TS v3 over the
> > > last 24 hours… though the changes are not online yet (as they're not
> > > complete).
> > > The excerpts method isn't added to search results by default, but it's
> > > easily enabled:
> > >
> > > search = MyModel.search 'phrase'
> > > search.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
> > > search.first.excerpts
> > >
> > > Cheers
> > >
> > > --
> > > Pat
> > >
> > > On 30/03/2013, at 1:39 PM, hipertracker wrote:
> > >
> > > > How to use excerpts in TS3? http://pat.github.com/ts/en/excerpts.html
> > > > is old and does not work in newer TS3.
> > > >
> > > > Thinking Sphinx 2.0.11:
> > > >
> > > > MyModel.search('phrase').first.excerpts
> > > > # => #<ThinkingSphinx::Excerpter:0x3fd79290348c>
> > > >
> > > > Thinking Sphinx 3.0.2:
> > > >
> > > > MyModel.search('phrase').first.excerpts
> > > > NoMethodError: undefined method `excerpts' for #<Verse:0x007fa5dde723d8>
> > > >
> > > > --
> > > > JZ
>
>
>
>
>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.