It all looks fine to me... but just to confirm, here's what I would be doing:
Atom.create! field1: 'foo', field2: 'bar', field_time: Time.zone.now
Delayed::Job.all.each { |job| puts job.attributes.inspect }
On 26 Apr 2014, at 10:01 am, [email protected] wrote:
> Weird. I inserted records using rails and still didn't see a job added to
> the row. (I left the delayed_jobs workers off so the jobs wouldn't get picked
> up from the table).
>
> rake ts:index and search calls on the object work fine.
>
> Here are the appropriate rails file excerpts in case there is an obvious
> mistake.
>
> somefile_index.rb:
>
> ThinkingSphinx::Index.define :myobject, :with => :active_record, :delta =>
> ThinkingSphinx::Deltas::DelayedDelta do
> # fields
> indexes field1, :sortable => true
> indexes field2, :sortable => true
>
> # attributes
> has field_time, created_at, updated_at
> end
>
> thinking_sphinx.yml
> development:
> enable_star: true
> min_infix_len: 3
> max_matches: 1000000
>
> Gemfile
> #use thinking-sphinx
> gem 'thinking-sphinx', '~> 3.1.1'
> #use thinking-sphinx delayed deltas
> gem 'ts-delayed-delta', '~> 2.0.2', :require =>
> 'thinking_sphinx/deltas/delayed_delta'
> #use delayed job
> gem 'delayed_job'
> #use delyed job active record
> gem 'delayed_job_active_record'
> #daemons to run the delayed jobs
> gem "daemons"
>
> mysql> show columns in atoms;
> +------------+------------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +------------+------------+------+-----+---------+----------------+
> | id | int(11) | NO | PRI | NULL | auto_increment |
> | field1 | text | YES | MUL | NULL | |
> | field2 | text | YES | MUL | NULL | |
> | created_at | datetime | YES | | NULL | |
> | updated_at | datetime | YES | | NULL | |
> | field_time | datetime | YES | | NULL | |
> | delta | tinyint(1) | NO | MUL | 1 | |
> +------------+------------+------+-----+---------+----------------+
> 7 rows in set (0.01 sec)
>
>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.