Hi Jochen
What's the full stack trace, and what does your define_index block look like?
Also: what versions of thinking sphinx are you using locally and production?
It's worth double-checking the gems:
gem list | grep thinking-sphinx
Cheers
--
Pat
On 19/10/2010, at 5:46 PM, Jochen Kaechelin wrote:
> Seems to be one of those days nothing will work:
>
> I have this:
>
> @products = Product.search @query,
> :with => {:active => 1},
> :match_mode => :extended2,
> :page => params[:page],
> :star => true,
> :per_page => 21,
> :max_matches => SPHINXMAXMATCHES,
> :conditions => search_filters(params[:searchfilter]), **** <--- line 281
> :order => "at_stock DESC, has_special_price DESC, sales_rank DESC, inventory
> DESC",
> :field_weights => { :boost => 90, :product => 1120, :description => 100,
> :brand => 40 }
>
>
> def search_filters(flag="")
> defaults = { :active => 1 }
>
> if flag.include? "category"
> defaults[:category_ids] = params[:category_id]
> end
>
> if flag.include? "has_special_price"
> defaults[:has_special_price] = 1
> end
>
> if flag.include? "at_stock"
> defaults[:at_stock] = 1
> end
>
> Everything works fine in development mode - in production mode I will get a:
>
> ArgumentError (wrong number of arguments (1 for 0)):
> app/controllers/products_controller.rb:281:in `search_filters'
>
> What's wrong here?
>
> Thanx
>
> --
> 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.