1
輪胎多搜索我想就Elasticsearch多查詢通過輪胎但生JSON 我可以一個請求這樣與原始JSON
@search = Tire.search('questions', query: {
function_score: {
query: {
bool: {
must: [
{
terms: {
interests: [2943,5106,3540,1443,3639]
}
}
]
}
},
random_score: {}
}
})
,但對於多我不能。 我想財產以後這樣的,但它不是正確的現在...
@search = Tire.multi_search 'questions' do
search :level2 do
query: {
function_score: {
query: {
bool: {
must: [{
terms: {
interests: [5090,2938,3062]
}}]
}
},
random_score: {}
}
}
end
end
你現在我所能做的是如何使它工作? 謝謝