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.
>
>
--
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.