Odd indeed that that's the cause. Try the following instead:

  indexes [contact.first_name, contact.last_name], :as => :contact_name

Cheers

-- 
Pat

On 16/02/2011, at 6:45 PM, gmoniey wrote:

> Hi Pat,
> 
> I took a closer look at the output of the indexer and I found the
> issue, but I still don't know/understand why it worked on my local.
> 
> It turns out I was trying to index multiple fields on an object, and
> apparently this was throwing an error. The same error is thrown on my
> local, but doesn't seem to prevent the record from being indexed.
> 
> indexes contact(:first_name, :last_name), :as => :contact_name
> 
> When I removed the :last_name, things started working correctly on
> production.
> 
> I'm glad I found the cause, but I was wondering if it is possible to
> do the above (combine multiple fields into 1 index on a relationship
> object)?
> 
> Thanks.
> 
> On Feb 15, 4:10 pm, Pat Allan <[email protected]> wrote:
>> Beyond indexing and query logs, I can't think of anywhere else to look, 
>> sorry.
>> 
>> --
>> Pat
>> 
>> On 16/02/2011, at 6:14 AM, gmoniey wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Yea...I took a snapshot of the production database.
>> 
>>> Are there any other logs, or anywhere else that I can look at?
>> 
>>> The odd thing, is I have been using sphinx in a separate app setup for
>>> almost a year and a half, and never ran into this issue.
>> 
>>> On Feb 15, 12:42 am, Pat Allan <[email protected]> wrote:
>>>> I'm at a bit of a loss what could be causing the problem... is the data 
>>>> the same on dev and production?
>> 
>>>> --
>>>> Pat
>> 
>>>> On 15/02/2011, at 7:05 PM, gmoniey wrote:
>> 
>>>>> Yup...I verified that the version across both systems are the same:
>> 
>>>>> Sphinx 0.9.9-release (r2117)
>>>>> daemon_controller (0.2.5)
>>>>> daemons (1.1.0)
>>>>> delayed_job (2.0.3)
>>>>> riddle (1.2.2)
>>>>> thinking-sphinx (1.3.20)
>>>>> ts-delayed-delta (1.1.1)
>> 
>>>>> And I rebuilt the indexes on both machines before running my tests.
>> 
>>>>> On Feb 14, 2:52 pm, Pat Allan <[email protected]> wrote:
>>>>>> Is it the same version of Sphinx on both machines? And I'm guessing 
>>>>>> you've run rake ts:rebuild on your production server?
>> 
>>>>>> --
>>>>>> Pat
>> 
>>>>>> On 15/02/2011, at 5:51 AM, gmoniey <[email protected]> wrote:
>> 
>>>>>>> I'm not sure whats going on, and I was hoping someone could help point
>>>>>>> me in the right direction as far as debugging is concerned. It seems
>>>>>>> that when I perform a simple search on my production setup, I am
>>>>>>> returned no results, while my local returns the correct result.
>> 
>>>>>>> I tested this in script/console, with the following query. On my
>>>>>>> local, 1 result was returned (which is correct), while on production
>>>>>>> an empty array is returned.:
>> 
>>>>>>> Contact.search('*107703*')
>> 
>>>>>>> I verified that I have the same set of gems on both machines. I
>>>>>>> checked the logs, and they didn't report any errors. I'm not sure
>>>>>>> where else to look.
>> 
>>>>>>> I also tried setting my local to production mode, and I continue to
>>>>>>> get the correct results. So I don't believe it is an issue with my
>>>>>>> yaml:
>> 
>>>>>>> development:
>>>>>>>  enable_star: 1
>>>>>>>  min_infix_len: 1
>>>>>>>  morphology: stem_en
>> 
>>>>>>> testing:
>>>>>>>  enable_star: 1
>>>>>>>  min_infix_len: 1
>>>>>>>  morphology: stem_en
>> 
>>>>>>> production:
>>>>>>>  version: 0.9.9
>>>>>>>  mem_limit: 256M
>>>>>>>  enable_star: 1
>>>>>>>  min_infix_len: 1
>>>>>>>  morphology: stem_en
>>>>>>>  bin_path: "/usr/local/bin"
>>>>>>>  config_file: "/u/apps/my_app/shared/config/production.sphinx.conf"
>>>>>>>  searchd_file_path: "/u/apps/my_app/shared/system/sphinx"
>>>>>>>  searchd_log_file: "/u/apps/my_app/shared/log/searchd.log"
>>>>>>>  query_log_file: "/u/apps/my_app/shared/log/searchd.query.log"
>>>>>>>  pid_file: "/u/apps/my_app/shared/pids/searchd.pid"
>> 
>>>>>>> It seems to only happen on specific records. Any ideas? Any other
>>>>>>> places that I should be looking for debug info?
>> 
>>>>>>> --
>>>>>>> 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 
>>> 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