2
現在我寫只有在使用ElasticSearch和Tire存在的情況下如何按屬性過濾搜索?
Tire.search INDEX_NAME do
query do
filtered do
query { string term }
filter :or, { missing: { field: :app_id } },
{ terms: { app_id: app_ids } }
end
end
end.results.to_a
您的解決方案有什麼我的''丟失''過濾器的優勢? ''filter:或者{{missing:{field :: app_id}}'' – tomekfranek
不要這麼想,儘管當我寫我的文章時, –