Hi Mike,

I’ve got some questions that may help us figure out the cause.

First, just to confirm: does a normal `rake ts:index` not get the data back 
into shape? And does this happen every time you update a ClientOrder instance?

Also, can you confirm whether there are any callbacks in ClientOrder that 
impact either Client or Order? And are the records missing in just the Sphinx 
index for ClientOrder? Or is it impacting Sphinx records for Order (if there’s 
an index on that model)?

And finally: you’re using the default delta approach - is Sphinx hosted on the 
same machine as your app? Is there anything in the Rails logs when you update a 
ClientOrder instance that provides clues to any problems?

Cheers,

— 
Pat

> On 5 Oct 2017, at 7:45 pm, mikej <mikejerem...@gmail.com 
> <mailto:mikejerem...@gmail.com>> wrote:
> 
> I am having a problem with records disappearing.  It happens intermittently, 
> I can’t recreate it.  Any thoughts on how to fix or debug this would be much 
> appreciated.
> 
> Here is a simplified version of my situation:
> 
> class Client < ActiveRecord::Base
>   has_many :client_orders
>   has_many :orders, :through => : client_orders
> end
> 
> ThinkingSphinx::Index.define : client_order, :with => :active_record, :delta 
> => true do
>   indexes this and that
>   has client_id
> end
> 
> thinking-sphinx 3.2.0
> Sphinx 2.2.9
> 
> When a client_order is updated all the orders for that client disappear.  
> Orders for other clients are fine.  Rightly or wrongly I can fix it with:
> 
> rm -r db/sphinx;rm config/production.sphinx.conf;rm -r tmp/binlog/production;
> rebuild index
> 
> I have a cron job in place to rebuild indexes daily.
> 
> Any thoughts?
> 
> Many thanks,
> 
> Mike
> 
> -- 
> 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 thinking-sphinx+unsubscr...@googlegroups.com 
> <mailto:thinking-sphinx+unsubscr...@googlegroups.com>.
> To post to this group, send email to thinking-sphinx@googlegroups.com 
> <mailto:thinking-sphinx@googlegroups.com>.
> Visit this group at https://groups.google.com/group/thinking-sphinx 
> <https://groups.google.com/group/thinking-sphinx>.
> For more options, visit https://groups.google.com/d/optout 
> <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 thinking-sphinx+unsubscr...@googlegroups.com.
To post to this group, send email to thinking-sphinx@googlegroups.com.
Visit this group at https://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to