Hi Brian

You'll want to add a after_save (or possibly after_commit) callback on  
your student model to set :delta => true on the teacher instance, and  
this should fire off the delta indexing.

You're right, it should be better documented. Ideally, it'd be nice  
for TS to add those hooks itself (if requested).

-- 
Pat

On 07/09/2009, at 1:09 AM, Brian wrote:

>
> I have a parent child object structure, let's say like Teacher and
> Student
>
> Teacher has_many :students
> Student belongs_to :teacher
>
> I want to search on Teacher, but search the text of a student as well.
> My index block would be this:
>
>  define_index do
>    indexes username
>    indexes school
>    indexes email
>    indexes students.bio
>
>    set_property :delta => true
>
>  end
>
> What happens for me, is that if I change the teacher username, school,
> or email I see the delta take place. But, if I update bio, the delta
> does not happen. If I manually build the index, I can search by bio
> fine, but delta only seems to work for the fields in the parent and
> not in the child.
>
> I've read through the docs and the PeepCode PDF, but can't seem to
> find any information about handling children different.
>
> Brian
>
> >


--~--~---------~--~----~------------~-------~--~----~
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