will_paginate_mongoid icon indicating copy to clipboard operation
will_paginate_mongoid copied to clipboard

Does not work with full text search

Open stabenfeldt opened this issue 11 years ago • 5 comments

Hi,

I get _undefined method `paginate' for #<Mongoid::Contextual::TextSearch_ if I try to paginate a full text search.

@ads = Ad.text_search( params[:q] )
  .paginate(:page => params[:page], :per_page => 10 )

It does however work nice if I don't do a search. E.g.:

Ad.paginate(:page => params[:page])

Any suggestions to how full text search and will paginate can play together?

Cheers, Martin

stabenfeldt avatar Dec 10 '13 14:12 stabenfeldt

Hi @stabenfeldt, I'm gonna investigate this on next weekend and returns to you. Thank you :+1:

lucasas avatar Dec 12 '13 10:12 lucasas

Thanks, that great! :-)

stabenfeldt avatar Dec 12 '13 11:12 stabenfeldt

Hi @lucasas, any updates? :-)

stabenfeldt avatar Jan 08 '14 13:01 stabenfeldt

Any updates here?

dylanbromby avatar May 09 '14 13:05 dylanbromby

I started using ElasticSearch for full text search. It works out of the box. :)

stabenfeldt avatar May 09 '14 13:05 stabenfeldt