$params = [
'index' => 'soso_*',
'type' => 'links_1',
'body' => [
'query' => [
'match' => [
'title' => $kw
]
],
'highlight' => [
'pre_tags' => '<em>',
'post_tags' => '</em>',
'fields' => [
'title' => new \stdClass()
]
],
]
];
[尊重社区原创,转载请保留或注明出处]
本文地址:http://elasticsearch.cn/article/661