검색을 위해 sunspot/solr을 사용하고 있습니다. 최근에 열이 가끔 값이 없기 때문에 일부 레코드가 인덱싱되지 않는 것으로 나타났습니다.일부 열이 nil 인 경우에도 레코드를 어떻게 인덱싱합니까?
solr이 관계없이이 레코드를 인덱스 할 수 있습니까?
이 내 검색 블록이 모습입니다 : 레일
searchable do
text :name
text :description
# this price_as_double can sometimes be nil
double :price_as_decimal
text :colors do
colors.map(&:name)
end
text :store do
unless store.nil?
store.name
end
end
string :store do
unless store.nil?
store.name
end
end
text :items_style do
unless items_style.nil?
items_style.name
end
end
time :created_at
boolean :editors_pick
string :sold_out
double :likes
end