This should do the trick: User.search_for_id(u.sphinx_document_id, 'user_core')
If you want to check the delta index, then that becomes: User.search_for_id(u.sphinx_document_id, 'user_delta') Cheers -- Pat On 19/01/2012, at 4:54 PM, Krishnaprasad Varma wrote: > Hi Pat, > > I like to know 2 things: > > 1) Is there any method to say weather the model has already been > processed and added to index. > > something like is_indexed? > > u = User.find_by_id(1234) > u.is_indexed? > > 2) what is the best practice to deal with rebuilding the indexes on > hearing that some objects didn't index well due to some problem. > > I am creating an admin interface to reindex all the unindexed fields > in user model . > sometimes if the delta index doesn't work due to some problem, we > often see some objects not appearing in sphinx search . > > When the database grows its difficult to rebuild the indexes every > time when some one report that a particular user is not appearing in > sphinx search. > > I am using delayed_job . > > -- > 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.
