Hi Rahul

What is the contents of your development.sphinx.conf file? Make sure you remove 
your database passwords before sending it to the list :)

Thanks

-- 
Pat

On 05/01/2010, at 7:59 PM, rahul100885 wrote:

> Hi Pat,
> 
> Following are my model on which I got an error
> #################### Error #################
> (in /home/rahul/application/demo)
> Generating Configuration to /home/rahul/application/demo/config/
> development.sphinx.conf
> Sphinx 0.9.9-release (r2117)
> Copyright (c) 2001-2009, Andrew Aksyonoff
> 
> using config file '/home/rahul/application/demo/config/
> development.sphinx.conf'...
> ERROR: section 'account_core_0' (type='source') already exists in /
> home/rahul/application/demo/config/development.sphinx.conf line 78 col
> 1.
> FATAL: failed to parse config file '/home/rahul/application/demo/
> config/development.sphinx.conf'
> ##########################################
> 
> 
> Account model
> -----------------------
>  define_index do
>    set_property :delta => true
>    indexes :name, :as => :account_name, :prefixes => true
>    indexes contacts.first_name, :as => :contact_first_name, :prefixes
> => true
>    indexes contacts.last_name, :as => :contact_last_name, :prefixes
> => true
>    indexes contacts.email, :as => :contact_email, :prefixes => true
>    has :id, :company_id
>    where "accounts.deleted_at is null "
>  end
> 
> 
> Contact model
> -----------------------
> 
>  define_index do
>    set_property :delta => true
>    indexes :first_name, :prefixes => true
>    indexes :last_name, :prefixes => true
>    indexes :email, :prefixes => true
>    indexes account.name, :as => :contact_account_name, :prefixes =>
> true
>    has :id, :company_id, :status_type
>    has account(:id), :as => :contact_account_id
>    where "contacts.deleted_at is null"
>  end
> 
> 
> Opportunity Model
> -------------------------
> 
> define_index do
>    set_property :delta => true
>    indexes :name, :as => :opportunity_name, :prefixes => true
>    indexes contact.first_name, :as => :contact_first_name, :prefixes
> => true
>    indexes contact.last_name, :as => :contact_last_name, :prefixes =>
> true
>    indexes contact.email, :as => :contact_email, :prefixes => true
>    indexes contact.account.name, :as
> => :opportunity_conatct_account_name, :prefixes => true
>    has :id, :company_id
>    where "opportunities.deleted_at is null"
>  end
> 
> 
> 
> 
> 
> 
> 
> On Jan 5, 1:34 pm, Pat Allan <[email protected]> wrote:
>> Hi Rahul
>> 
>> Can you put into a gist all of your models that have sphinx indexes, so we 
>> can look through the code in a bit more detail?
>> 
>> Thanks
>> 
>> --
>> Pat
>> 
>> On 05/01/2010, at 7:30 PM, rahul100885 wrote:
>> 
>>> Hi Pat,
>> 
>>> In above case how I have to specify since I tried as per mine in many
>>> ways but still problem persist.
>> 
>>> Regards,
>>> Rahul P. Chaudhari
>> 
>>> On Jan 4, 5:42 pm, Pat Allan <[email protected]> wrote:
>>>> Hi Rahul
>> 
>>>> Are these two indexes the second indexes in each model? If so, they need 
>>>> an explicit name, like so
>> 
>>>>  define_index 'account_extra' do
>>>>    # ...
>>>>  end
>> 
>>>> --
>>>> Pat
>> 
>>>> On 04/01/2010, at 9:09 PM, rahul100885 wrote:
>> 
>>>>> Hi,
>> 
>>>>> In my application search work on thinking sphinx (version 1.3.5) but
>>>>> when I switch my version to 1.3.14 my search code gives me following
>>>>> error.
>> 
>>>>> using config file '/home/rahul/application/demo/config/
>>>>> development.sphinx.conf'...
>>>>> ERROR: section 'contact_core_0' (type='source') already exists in /
>>>>> home/rahul/application/demo/config/development.sphinx.conf line 82 col
>>>>> 1.
>>>>> FATAL: failed to parse config file '/home/rahul/application/demo/
>>>>> config/development.sphinx.conf'
>> 
>>>>> In account model I have specified,
>> 
>>>>> define_index do
>>>>>   set_property :delta => true
>>>>>   indexes :name, :as => :account_name, :prefixes => true
>>>>>   indexes contacts.first_name, :as => :contact_first_name, :prefixes
>>>>> => true
>>>>>   indexes contacts.last_name, :as => :contact_last_name, :prefixes
>>>>> => true
>>>>>   indexes contacts.email, :as => :contact_email, :prefixes => true
>>>>>   has :id, :company_id
>>>>>   where "accounts.deleted_at is null "
>>>>> end
>> 
>>>>> In contact model,
>> 
>>>>> define_index do
>>>>>   set_property :delta => true
>>>>>   indexes :first_name, :prefixes => true
>>>>>   indexes :last_name, :prefixes => true
>>>>>   indexes :email, :prefixes => true
>>>>>   indexes account.name, :as => :contact_account_name, :prefixes =>
>>>>> true
>>>>>   has :id, :company_id, :status_type
>>>>>   has account(:id), :as => :contact_account_id
>>>>>   where "contacts.deleted_at is null"
>>>>> end
>> 
>>>>> Like this in many other models I am using contact and account index
>>>>> for their respective search.
>> 
>>>>> So how can I specify multiple index in version 1.3.14
>> 
>>>>> Thanks & Regards,
>>>>> 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