But that same code works in script/console? When looking at the logs from script/server, are you seeing delta being set to 1 when updating the status?
-- Pat On 29/06/2010, at 6:40 PM, Jim Ruther Nill wrote: > I think update_attribute fires callbacks, it just doesn't pass through > validations (which is what I want). So instead of update_attribute, I used > > contact.status = 'deleted' > contact.save(false) > > but the index is still not updating :( > > > On Tue, Jun 29, 2010 at 4:17 PM, Pat Allan <[email protected]> wrote: > The issue here could be update_attribute - it doesn't fire callbacks, I'm > pretty sure. update_attributes (note the plural) does - give that a shot? > > -- > Pat > > On 29/06/2010, at 6:09 PM, Jim Ruther Nill wrote: > > > My define_index block > > > > define_index do > > indexes :name, :sortable => true > > indexes [country_code, phone_number], :as => :full_number, :sortable => > > true > > indexes groups(:name), :as => :gnames, :sortable => true > > > > where "status = 'active'" > > > > has user_id > > has groups(:id), :as => :group_ids > > > > set_property :delta => true > > end > > > > I'm updating a contact's status in the console by using update_attribute. > > Same thing I'm doing when a link is clicked. > > > > > > On Tue, Jun 29, 2010 at 3:38 PM, Pat Allan <[email protected]> > > wrote: > > Hmm, right. So just script/server which is invoking Mongrel, I'm guessing. > > > > What does your define_index block look like? And what change are you making > > to the object? Or more to the point: are you making the exact same change > > in the console that the link is making? > > > > TS won't always set delta to true if it can figure out it's not necessary. > > > > -- > > Pat > > > > On 29/06/2010, at 5:26 PM, Jim Ruther Nill wrote: > > > > > I have passenger installed but I'm not using that. I'm just running the > > > server in my local machine. > > > > > > On Tue, Jun 29, 2010 at 3:21 PM, Pat Allan <[email protected]> > > > wrote: > > > Sounds like a PATH issue... I'm guessing you're using Passenger? > > > > > > http://freelancing-god.github.com/ts/en/common_issues.html#passenger > > > > > > -- > > > Pat > > > > > > On 29/06/2010, at 4:28 PM, Jim Ruther Nill wrote: > > > > > > > Hi Pat, > > > > > > > > > > > > I just want to ask what's the difference between updating a record in > > > > the console and in the app. I'm working on a new app which saves > > > > contacts. When I try to update the contact's status using the console, > > > > the indexer fires up. Good. But when I use a link, for example, to > > > > update the status, the indexer does not fire up. > > > > > > > > Any thoughts? > > > > > > > > > > > > ------------------------------------------------------------- > > > > visit my blog at http://jimlabs.heroku.com > > > > > > > > -- > > > > 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. > > > > > > > > > > > > > > > -- > > > ------------------------------------------------------------- > > > visit my blog at http://jimlabs.heroku.com > > > > > > -- > > > 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. > > > > > > > > > > -- > > ------------------------------------------------------------- > > visit my blog at http://jimlabs.heroku.com > > > > -- > > 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. > > > > > -- > ------------------------------------------------------------- > visit my blog at http://jimlabs.heroku.com > > -- > 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.
