You can fire off a delta index request for a model via the index_delta method:

  ForumPost.index_delta

If there's a specific object you want to index with, then add that as an 
argument:

  ForumPost.index_delta forum_post

The latter will ensure the object is hidden in the core index (and thus, won't 
match on old values as well as the new ones).

Cheers

-- 
Pat

On 17/02/2012, at 3:08 AM, jebw wrote:

> Hi,
> 
> I've currently got a complex set of model joins,
> 
> ForumPost -> Tagging <- Tag <-> TagTheme
> 
> Forum Post has many taggings
> Search tag has many taggings
> Forum Post has many tags through taggings
> 
> Tag has_and_belongs_to_many TagThemes
> 
> What I'd like to do is trigger a delta update on the relevant
> ForumPosts when a TagTheme is updated (the ids from tag themes are
> getting included in the index on ForumPost).
> 
> The obvious way to do this seems to be to go to raw SQL and use
> mysql's non standard
> 
>     UPDATE forum_posts SET delta=1 JOIN xxx WHERE something=changed.
> 
> As I understand it I still still need to trigger searchd to reindex
> the delta? If so how would I go about this, is there a method I can
> call on an object or am I better extracting the command line from the
> Thinking Sphinx and running that manually?
> 
> This is against 1.4.11 if that makes any difference.
> 
> Thanks
> 
> Jebw
> 
> -- 
> 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.

Reply via email to