[OK]をので、私は私が上で検索する必要がある日付フィールドを持っていますが、私が試した私は、mysqlのクエリでattr_accessorを使用するように検索するにはどうすればよいですか?
search_conditions << ["DAY(open_date) != ?", event.thursday.day] if options[:thur].blank?
のような一日でそれを検索する必要があると私はスフィンクスを考えると、この条件を行う必要がありますこの
attr_accessor :event_day
def event_day
self.start_date.day
end
#thinking sphinx configurations for the event search
define_index do
indexes event_day
...
...
とは、検索で、私はしかし、私はこのエラー
を得続けるこのsearch_string = "@event_day -#{event.thursday.day}" unless options[:thur].blank?
を試してみました
index event_core: query error: no field 'event_day' found in schema
この作品
私はこの日を返す方法を作成する – Trace