facets don't work after upgrading to TS3

45 views
Skip to first unread message

pix_plm

unread,
May 23, 2013, 9:30:49 AM5/23/13
to thinkin...@googlegroups.com
Hi,
I've upgraded from TS2 to TS3 and I can"t make facets work.
For instance, with my model Statistic, search is ok but facet no
facets = Statistic.facets(mystring)
facet.each{| f, f_option| puts f} gets error :
ThinkingSphinx::SyntaxError: sphinxql: syntax error, unexpected ',', expecting IDENT near ', @count FROM `statistic_core`, `statistic_delta` WHERE MATCH('hollande @sphinx_internal_class_name (Statistic)') AND sphinx_deleted = 0 GROUP BY sphinx_internal_class LIMIT 0, 20 OPTION max_matches=10000; SHOW META; SELECT *, *, @groupby, @count FROM `statistic_core`, `statistic_delta` WHERE MATCH('hollande @sphinx_internal_class_name (Statistic)') AND sphinx_deleted = 0 GROUP BY provider_id LIMIT 0, 20 OPTION max_matches=10000;

statistic_index.rb :
ThinkingSphinx::Index.define(:statistic, :with => :active_record, :delta => true) do
  indexes user.login, :as => :user_login, :sortable => true
  indexes user.title.name, :as => :title_name, :sortable => true
  indexes image.provider.name, :as => :provider_name, :sortable => true
  indexes image.creator, :as => :creator, :sortable => true
  indexes image.headline, :as => :headline, :sortable => true
  indexes image.description, :as => :description
  indexes image.subject, :as => :subject

  # attributes
  has user_id, image_id, created_at
  has user.title_id, :as => :title_id
  has image.provider_id, :as => :provider_id, :facet => true
  has operation_label_id
end

thinking-shpinx.yml : 
  morphology: none
  enable_star: true
  min_prefix_len: 3
  html_strip: 1
  mem_limit: 1024M
  max_matches: 10000
  bin_path: '/usr/local/bin'  


configuration
Sphinx 2.0.1-beta (r2792)
TS 3.0.3
mysql2 (0.3.12b6)
Rails 3.2.13

Anyone to help me ?
Thanks
P

Pat Allan

unread,
May 23, 2013, 9:34:08 AM5/23/13
to thinkin...@googlegroups.com
Can you try upgrading Sphinx to 2.0.6 or 2.0.7?

> --
> 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 thinking-sphi...@googlegroups.com.
> To post to this group, send email to thinkin...@googlegroups.com.
> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



Patrick Lamotte

unread,
May 24, 2013, 5:56:53 AM5/24/13
to thinkin...@googlegroups.com
Thanks one again Pat, it was the problem I upgraded Sphinx to 2.0.7 and it did work fine
Best regards
P
> You received this message because you are subscribed to a topic in the Google Groups "Thinking Sphinx" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/thinking-sphinx/zn-o2drCiws/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to thinking-sphi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages