EdgeNGramFilterFactory not working (not indexing?)

折月煮酒 提交于 2019-12-07 19:18:25
Kevin

I think I found the problem and it looks like a noob error.

In my model, is was using the following construct as per one of the tutorials:

class Institution < ActiveRecord::Base
 .
 .
 .
end

Sunspot.setup(Institution) do
  text :name
end

This did not seem to throw any errors when I started, stopped, or reindexed. It struck me as strange that I was able to reindex immediately after stopping Solr.

I switched to

class Institution < ActiveRecord::Base
  .
  .
  .
  searchable do
    text :name
  end
endH

When I did this, I found that I could not reindex after stopping Solr. However, when I started Solr and reindexed, the index appeared to be truly refreshed and my queries finally behaved as expected.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!