Hi Rahul

I'm afraid TS isn't really built for this - you could try manually editing 
configuration files so the two sites use the one setup, but you'll need to 
manage this complexity yourself. That, or have some sort of API that notifies 
the second site that data has changed, and it does its own delta indexing as 
well.

-- 
Pat

On 12/04/2011, at 1:42 AM, rahul100885 wrote:

> Hi Pat,
> 
> Actually issue is, I have same database for to different application
> one application is for normal users and another is for mobile users.
> So currently I have two different sphinx server which run on their own
> application server. Which works fine.
> 
> But when mobile users add any record (contacts), it is only for search
> in mobile application via delta indexing. But same time it is not
> available on normal application. It will be available when my
> scheduler (cron) run the "rake ts:in" on normal application.
> 
> e.g
> |-------------------------------------------|
> |  Normal app - Sphinx server |
> |-------------------------------------------|
>      Normal application (IP -
> X.X.X.A)
> |---------------------------|
> 
> |  Database server |
> 
> |---------------------------|
> |-------------------------------------------|
> IP - X.X.X.C
> |  mobile app - Sphinx server  |
> |-------------------------------------------|
>      Mobile application ( IP - X.X.X.B)
> 
> Here sphinx from A and B, share same database. But if any adding done
> on site A will not available for B since we are using different sphinx
> server.
> 
> To over come this situation, I have tried,
> 
> |-------------------------------------------|
> |  Normal app                        |
> |-------------------------------------------|
>      Normal application (IP - X.X.X.A)
> |------------------------|
> |---------------------------|
> 
> | Sphinx server   |                              |  Database server |
> 
> | -----------------------|
> |---------------------------|
> |-------------------------------------------|
> IP - X.X.X.D                                           IP - X.X.X.C
> |  mobile app                         |
> |-------------------------------------------|
>      Mobile application ( IP - X.X.X.B)
> 
> Single sphinx server. Now searching is work, but delta indexing is not
> updating add any newly added record.
> For this I have used "address: X.X.X.D" in sphinx.conf and
> "ThinkingSphinx.remote_sphinx = true" in production.rb in both app
> server.
> 
> Regards,
> Rahul P. Chaudhari
> 
> 
> 
> 
> 
> On Apr 11, 10:41 am, Pat Allan <[email protected]> wrote:
>> Hi Rahul
>> 
>> Given the core part of Sphinx itself doesn't use much memory - it's all the 
>> attribute values in memory that can make it use a lot of memory - I'd 
>> recommend using two separate searchd daemons, and just run them on different 
>> ports. This avoids any hassles of having to manually edit configuration 
>> files.
>> 
>> http://freelancing-god.github.com/ts/en/common_issues.html#multiple
>> 
>> Cheers
>> 
>> --
>> Pat
>> 
>> On 08/04/2011, at 2:08 AM, rahul100885 wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Pat,
>> 
>>> Also I would like to know, is it possible to share sphinx server
>>> across multiple application.
>> 
>>> Like, suppose I have single database server, single sphinx server and
>>> two web servers.
>> 
>>> And in these two web servers two different version of thinking sphinx
>>> are getting used.
>>> As one application is using Rails 3.0.5 and other is using Rails
>>> 2.3.5.
>> 
>>> I tried using adding address: X.X.X.X into sphinx.conf file.
>> 
>>> Searching is working but not delta indexing. since it try to locate a
>>> indexing files, but server not found that.
>> 
>>> Is their any way for that.
>> 
>>> Thanks,
>>> Rahul P. Chaudhari
>> 
>>> On Apr 7, 8:14 pm, rahul100885 <[email protected]> wrote:
>>>> Pat,
>> 
>>>> Really thanks for reply, I have already tried this solution, but my
>>>> new contact or account is not getting listed in search.
>> 
>>>> Ok no issues I will try it again and let you know.
>>>> Since I tried
>>>>    account.update_attribute(:delta => true)
>> 
>>>> but not Account.index_delta
>> 
>>>> I guess it should work.
>> 
>>>> Thanks,
>>>> Rahul P. Chaudhari
>> 
>>>> On Apr 7, 8:58 am, Pat Allan <[email protected]> wrote:
>> 
>>>>> Hi Rahul
>> 
>>>>> This is a little tricky, but perhaps try the following (from the Contact 
>>>>> perspective): instead of performing a normal update to the accounts, use 
>>>>> the update_attribute method (singular, not plural), as that doesn't fire 
>>>>> callbacks:
>> 
>>>>>   account.update_attribute(:delta => true)
>> 
>>>>> And then just update the account delta index on a model level, instead of 
>>>>> instance:
>> 
>>>>>   Account.index_delta
>> 
>>>>> This avoids all callbacks, and so should avoid the looping.
>> 
>>>>> Also, you may want to simplify things further by just updating the delta 
>>>>> flag directly in the database, using the update_all method (double-check 
>>>>> this, but I think it should work):
>> 
>>>>>   Account.update_all {:delta => true}, {:id => account_ids}
>> 
>>>>> (First hash is values to change, second is the conditions on the UPDATE 
>>>>> statement).
>> 
>>>>> Cheers
>> 
>>>>> --
>>>>> Pat
>> 
>>>>> On 04/04/2011, at 11:11 PM, rahul100885 wrote:
>> 
>>>>>> Hi,
>> 
>>>>>> In my application I am using thinking sphinx extensively. But
>>>>>> currently I am facing an issue with delta indexing.
>>>>>> My delta indexing goes into infinite loop.
>> 
>>>>>> e.g
>>>>>> Suppose I have Account and Contact model with many-many relationship.
>>>>>> As specified in thinking-sphinx documentation, use callback for
>>>>>> updating respective model
>> 
>>>>>> So if I update any contact, I have a callback to update related
>>>>>> Accounts in Contacts.
>> 
>>>>>> and vice-versa (Account has a callback for updating respective
>>>>>> Contacts)
>> 
>>>>>> Now if I update any contact it goes into loop via callback.
>> 
>>>>>> Is there any standard solution for this situation.
>> 
>>>>>> Also let me know how delta indexing work, will it add any callback for
>>>>>> delta indexing.
>> 
>>>>>> Thanks,
>>>>>> Rahul P. Chaudhari
>> 
>>>>>> --
>>>>>> 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 
>>>>>> athttp://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 
>>> athttp://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.
> 

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