これまでのところ、タイヤとelasticsearchが大好きですが、次のような範囲間の値を検索する方法がわかりません。
- age_from age_to
- 18~20
そして、年齢がこれら 2 つの範囲の間にあるすべてのプロファイルを返しますか? 整数列 Profile.age があります
これまでのところ不完全な機能
def self.search(params)
#, default_operator: "AND
tire.search(load: true, page: params[:page], per_page: 20) do
query do
should { string params[:query] } if params[:query].present?
should { integer age_to[:age_to] } if params[:age_to].present?
end
to_curl
end
end