dougal / acts_as_indexed

Acts As Indexed is a plugin which provides a pain-free way to add fulltext search to your Ruby on Rails app
http://douglasfshearer.com/blog/rails-plugin-acts_as_indexed
MIT License
211 stars 49 forks source link

search not working #27

Closed kritik closed 12 years ago

kritik commented 12 years ago

I have Windows, ruby 1.9.3p0, mysql as a database

class Tour
  acts_as_indexed :fields => [:ascii_name, :type_name, :ascii_description, :routename, :cover_image_uid, :cover_image_name]
private

  def ascii_name
    (self.name || '').to_ascii
  end

  def ascii_description
    (self.description || '').to_ascii
  end
end
irb(main):005:0> Tour.last.name
=> "Нью-Йорк + Отдых в Мексике (без авиа)"
irb(main):006:0> Tour.last.name.to_ascii
=> "N'iu-Iork + Otdykh v Mieksikie (biez avia)"
irb(main):007:0> Tour.with_query('avia')
=> []

I have removed removed all indexes and re-saved all documents. But still cannot find anything

dougal commented 12 years ago

Hi kritik.

I can't replicate this with my local non-Windows environment.

Can you perhaps try the latest development version and see if that fixes things? Add the following to your Gemfile to do so...

gem 'acts_as_indexed', :git => 'git@github.com:dougal/acts_as_indexed.git', :branch => 'development'

Thanks.

kritik commented 12 years ago

I had to remove old index but it still doesn't work

kritik commented 12 years ago

Sorry, I tried it on not fixed model. It works

dougal commented 12 years ago

Excellent. Can I close this issue now?

kritik commented 12 years ago

I'll do it myself