ThinkingSphinx::SphinxError: no enabled local indexes to search

238 views
Skip to first unread message

Arun Sakthivel

unread,
Nov 7, 2013, 9:20:38 AM11/7/13
to thinkin...@googlegroups.com
Hi,
My code is,

  define_index do
    set_property :delta => true
    set_property :docinfo => 'extern'
    set_property :min_word_len => 1
    set_property :wordforms => 'db/dicts/wordforms.txt'
    set_property :stopwords => 'db/dicts/stopwords.txt'

    indexes :name
    indexes :description
    indexes places(:country), :as => :country
    indexes guide_tags(:name_en), :as => 'tag_names_en', :separator => ' '
    indexes guide_tags(:name_nl), :as => 'tag_names_nl', :separator => ' '
    indexes guide_tags(:name_fr), :as => 'tag_names_fr', :separator => ' '
    indexes guide_tags(:name_pt), :as => 'tag_names_pt', :separator => ' '
    indexes places(:city_id), :as => 'indexed_city_id', :separator => ' '

    has places(:city_id), :as => :city_ids
    has :created_at
    has :guide_places_count
    has :likings_count
    has :comments_count
  end


Im getting error : ThinkingSphinx::SphinxError: no enabled local indexes to search

Timo Virkkala

unread,
Nov 8, 2013, 1:17:53 AM11/8/13
to thinkin...@googlegroups.com
Hi Arun,

Which version of Thinking Sphinx are you using? If it's version 3.*,
you should be using the new way of defining indices: put them in
separate files in app/indices, and start them with
ThinkingSphinx::Index.define, not define_index.

Look at the documentation to learn more:
http://pat.github.io/thinking-sphinx/quickstart.html

If you're on ThinkingSphinx v2, then we need more information to be
able to help you. What have you tried?

-Timo
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

Arun Sakthivel

unread,
Nov 8, 2013, 1:22:02 AM11/8/13
to thinkin...@googlegroups.com
Hi Timo,
Thanks for reply.

Thinking-Sphinx version = 2.0.14

Thanks & Regards,
S.Arun

Pat Allan

unread,
Nov 10, 2013, 12:48:52 AM11/10/13
to thinkin...@googlegroups.com
Hi Arun

Just confirming: have you run `rake ts:index` since adding this index definition to your app?

— 
Pat
Reply all
Reply to author
Forward
0 new messages