Ruby on rails 使用\u pg\u搜索\u突出显示相关字段

Ruby on rails 使用\u pg\u搜索\u突出显示相关字段,ruby-on-rails,pg-search,Ruby On Rails,Pg Search,目前,我正在使用在相关表格字段上加亮显示来执行pg_搜索,我得到: PG::UndefinedTable:错误:表“PG_search_17ebb3b05265b756196ca6”的子句条目中缺少 我用的是rubygem pg_搜索-第2.3.2节 关于我的项目模型 item.rb belongs_to :brand include PgSearch::Model pg_search_scope :associated_search, against: [[:name, 'A']],

目前,我正在使用在相关表格字段上加亮显示来执行pg_搜索,我得到:

PG::UndefinedTable:错误:表“PG_search_17ebb3b05265b756196ca6”的子句条目中缺少

我用的是rubygem pg_搜索-第2.3.2节

关于我的项目模型 item.rb

belongs_to :brand

include PgSearch::Model
pg_search_scope :associated_search,
  against: [[:name, 'A']],
  associated_against: {brand: [:code]},
  using: {
    tsearch: {
      prefix: true,
      dictionary: "english",
      negation: true,
      highlight: {
        StartSel: '<b>',
        StopSel: '</b>',
        MaxWords: 10,
        MinWords: 2,
        ShortWord: 4,
        HighlightAll: false,
        MaxFragments: 3,
        FragmentDelimiter: '<br>---<br>'
      }
    }
  }
Item.associated_search(params[:query]).with_pg_search_highlight

在gem中稍微挖掘一下问题,它实际上是一个2年前的bug,还没有被解决


我也有同样的问题。你解决了这个问题吗?