0
我有記錄,「Pharrell Williams」,「Will Smith」,「will.i.am」。 當我舉例:Artist.search("will")
我想看到他們所有。 我已經嘗試過建議,並且misspellings: { edit_distance: 5 }
但是我只能得到'威爾史密斯'了。Searchkick - 如何顯示所有類似結果
我有記錄,「Pharrell Williams」,「Will Smith」,「will.i.am」。 當我舉例:Artist.search("will")
我想看到他們所有。 我已經嘗試過建議,並且misspellings: { edit_distance: 5 }
但是我只能得到'威爾史密斯'了。Searchkick - 如何顯示所有類似結果
使用此:
class Artist < ApplicationRecord
searchkick word_start: [:name]
...
然後
Artist.search 'will', fields: ['name'], match: :word_start
應該返回所有3個結果。