I thought I approved this email, but it hasn't arrived yet - so I'll just reply 
anyway ;)

Do you have any other search libraries installed that may be getting in the 
way? Also, what happens if you wrap the entire method call in parentheses? I 
don't think Ruby is getting confused about that, but no harm checking:

  Product.search((params[:q] || ''), :page => (params[:p] || 1))

-- 
Pat

On 30/07/2010, at 2:27 AM, T Untario wrote:

> Hello,
> 
> I'm new to both Sphinx and Thinking Sphinx. I'm following a tutorial
> in Thinking Sphinx PDF from PeepCode when trying this search.
> 
> I'm using:
> ubuntu 10.04
> rails 2.3.8
> ruby 1.9.1
> thinking-sphinx-1.3.18 (installed via gem)
> sphinx 0.9.8 (installed via apt-get)
> 
> I created indexes and started the searchd, it went fine.
> 
> These are errors I found:
> 
> @products = Product.search (params[:q] || ''), :page => (params[:p] ||
> 1)
> Error: Wrong number of argument (2 of 3)
> 
> If I omit the :page arguments
> @products = Product.search (params[:q] || '')
> Error: Wrong number of argument (1 of 3)
> 
> If I add any other arguments, like in:
> @products = Product.search (params[:q] || ''), :page => (params[:p] ||
> 1), :with => {store_id => 1}
> Error: Wrong number of argument (2 of 3)
> 
> 
> I'm totally stuck, can't get past this .search problem, can't get any
> result at all.
> 
> Thanks in advance.

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