Sure!

class Document < ActiveRecord::Base
  belongs_to :client
  has_attachment :storage => :s3,
                 :max_size => 2048.kilobytes,
                 :s3_access => :authenticated_read

  define_index do
      indexes title
      indexes description
      indexes filename
      indexes client_id
      has :client_id
      set_property :delta => :delayed
    end
end

class Faq < ActiveRecord::Base
  belongs_to :client

  define_index do
      indexes title
      indexes body
      indexes client_id
      has :client_id
      set_property :delta => :delayed
    end
end


On Jan 10, 5:18 pm, Pat Allan <[email protected]> wrote:
> Are you able to share your model code here or in a gist?
>
> --
> Pat
>
> On 10/01/2010, at 9:50 AM, rfelix wrote:
>
>
>
> > I've had TS working for awhile with no issues.. I'm on Sphinx 0.9.8.1,
> > delayed_job 1.8.4, and TS 1.3.14.
>
> > I've followed the instructions 
> > athttp://freelancing-god.github.com/ts/en/deltas.html
> > to get delayed_delta working:
> > installed the gem/dependencies
> > added gem to environment.rb
> > required delayed_delta in my Rakefile
> > created the delayed_jobs db table
> > added   set_property :delta => :delayed to my models
> > added a boolean column named "delta" to my model db tables
> > rebuilt TS indexes: rake thinking_sphinx:rebuild
> > started the rake task: rake ts:dd
>
> > i see that the ruby process with the proper PID is running, but if i
> > create a new record for the model or update an existing one, the
> > "delta" field never changes from 1 to 0 and the index never seems to
> > update.  If i manually run rake thinking_sphinx:rebuild, it updates
> > the model records and the index, and my searches work as expected.
> > What am I missing here?
>
> > How can i debug this? How often should delayed_delta be updating my
> > index?
>
> > Thanks.
> > --
> > 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 
> > athttp://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.


Reply via email to