Hi Jorge This is a new issue, but let's start with the generated config file, config/development.sphinx.conf. What's the sql_query value for your dish_core_0 source?
-- Pat On 29/11/2009, at 11:06 AM, Pat Allan wrote: > (Was in the moderation queue according to my email, but not Google's > site. Have forwarded this on. Originally from scriptbox/[email protected] > ) > > Hello, > > For three days I'm facing a very weird problem. I have a script that > works fine, so I started using Thinking Sphinx to improve performance. > So I installed and added two indexes, as following: > > class Category < ActiveRecord::Base > > # relation entre les tables > belongs_to :macrocategory > > define_index do > indexes terms > end > > end > > class Dish < ActiveRecord::Base > > # Rélation entre les tables > belongs_to :partner > has_one :decomposition > has_many :dish_combos > > define_index do > indexes label > end > > # Named Scopes > named_scope :get_distinct_macrocategories, :select => 'DISTINCT ON > (combo_macrocategory) combo_macrocategory' > named_scope :not_decomposed_dishes, :select => 'id, > label', :conditions => ['combo_categories IS NULL'] > end > > The problem is that everytime I launch the indexing action with rake > thinking_sphinx:index the first model table is indexed, but not the > second one. And I got the following output: > > Generating Configuration to /Users/jorgegomes/Sites/amv/config/ > development.sphinx.conf > Sphinx 0.9.9-rc2 (r1785) > Copyright (c) 2001-2009, Andrew Aksyonoff > > using config file '/Users/jorgegomes/Sites/amv/config/ > development.sphinx.conf'... > indexing index 'category_core'... > collected 151 docs, 0.0 MB > collected 0 attr values > sorted 0.0 Mvalues, 100.0% done > sorted 0.0 Mhits, 100.0% done > total 151 docs, 13516 bytes > total 0.015 sec, 894862 bytes/sec, 9997.35 docs/sec > distributed index 'category' can not be directly indexed; skipping. > indexing index 'dish_core'... > ERROR: index 'dish_core': sql_query_range: : range-query failed: > ERROR: relation "dishes" does not exist > (DSN=pgsql://gomesjorge:*...@localhost:5432/amv). > total 0 docs, 0 bytes > total 0.061 sec, 0 bytes/sec, 0.00 docs/sec > distributed index 'dish' can not be directly indexed; skipping. > indexing index 'macrocategory_core'... > collected 23 docs, 0.0 MB > collected 0 attr values > sorted 0.0 Mvalues, 100.0% done > sorted 0.0 Mhits, 100.0% done > total 23 docs, 443 bytes > total 0.012 sec, 35318 bytes/sec, 1833.69 docs/sec > distributed index 'macrocategory' can not be directly indexed; > skipping. > total 10 reads, 0.000 sec, 13.8 kb/call avg, 0.0 msec/call avg > total 18 writes, 0.000 sec, 2.3 kb/call avg, 0.0 msec/call avg > > But the table exists and the model works fine, can you help please I'm > really stucked in this problem. > > Thank you very much! > > -- > > You received this message because you are subscribed to the Google > Groups "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] > . > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en > . > > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
