I think you've missed one step: you need to add a boolean column with the name 'delta' to your model.
-- Pat On 09/07/2010, at 4:02 AM, Chiyu Ian He wrote: > Hi, > > I just started using Thinking Sphinx to make a search engine. So far I > have been having a lot of success with Thinking Sphinx and my search > engine works great. I am now trying to implement Delta Indexing so > that I will not need to continuously type rake thinking_sphinx:index, > rake thinking_sphinx:start, and rake thinking_sphinx:rebuild. However > I keep getting an error whenever I try to create a new job. > > ERROR MSG: > NoMethodError in JobsController#create > > undefined method `delta=' for #<Job:0x7f81db28a7a8> > > CONTROLLER: > class JobsController < ApplicationController > > def index > @page_title = 'Jobs List' > @jobs = Job.search params[:search], :sort_mode > => :extended, :order => "id DESC", :page => params[:page], :per_page > => 20 > > end > > MODEL: > class Job < ActiveRecord::Base > > belongs_to :jobs > > define_index do > indexes client_name > indexes analyst > indexes client_job_number > indexes due_date > indexes report_date > indexes job_number > > has id > > set_property :delta => true > end > > MIGRATION FILE: > class CreateJobs < ActiveRecord::Migration > def self.up > > create_table :jobs do |t| > t.integer :job_number, :delta, :null => false > t.string :client_job_number, :delta, :limit => > 255 > t.date :due_date, :delta > t.string :billing_category, :delta, :limit => > 100 > t.string :billing_code, :delta, :limit => 10 > t.string :client_code, :delta, :limit => 10 > t.string :client_name, :delta, :limit => 255, > :null > => false > t.string :created_by, :delta, :limit => > 50, :null > => false > t.string :updated_by, :delta, :limit => 50, > :null > => false > > t.timestamps > #end > end > > def self.down > drop_table :jobs > end > end > > -- > 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.
