Hi Daniel I was just able to reproduce the issue, but once I added some example relationships into the database, it was fine.
This is an unfortunate limitation of polymorphic indexing - you *need* data in your database (in particular, each relevant polymorphic join type) before generating the configuration file (which the index task does). So: make sure you've got some tasks that have taskables with the column project_id. If you've already got that data and it's still not working, let me know. Cheers -- Pat On 12/07/2009, at 10:05 AM, Daniel Vartanov wrote: > > I have a model: > class Task < ActiveRecord::Base > belongs_to :taskable, :polymorphic => true > > define_index do > has taskable.project_id, :type => :integer, :as => :project_id > end > end > > And when I run index, I get the following error: > > indexing index 'task_core'... > ERROR: index 'task_core': sql_range_query: Unknown column > 'tasks.project_id' in 'field list' > > This bug appeared earlier but was fixed but couple of commits: > http://groups.google.com/group/thinking-sphinx/browse_thread/thread/a87f1f6f763f1d01/37c5db27ee935b70?lnk=gst#37c5db27ee935b70 > > I use version 1.1.23 now but bug appeared again. How can I get rid of > it? > Thanks in advance. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
