1、設(shè)置highlight 結(jié)果返回?cái)?shù)據(jù)長(zhǎng)度:fragment_size,默認(rèn)是100
{
"query" : {...},
"highlight" : {
"order" : "score",
"fields" : {
"content" : {"fragment_size" : 150, "number_of_fragments" : 3}
}
}
}
當(dāng)把 number_of_fragments 設(shè)置為0時(shí),默認(rèn)返回匹配到的全部content字段的內(nèi)容(已做highlight處理的)
2、多關(guān)鍵字同時(shí)匹配、包含的檢索語句(query_string)