相关疑难解决方法(0)

按名称排序elasticsearch

我尝试使用弹性搜索和官方 php 客户端按名称对文档进行排序,我该如何继续?

    $params = [
        'index' => $this->index ,
        'type' => 'videos',
        'from' => $this->uri->segment(2),
        'size' => 12,
        'body' => [
        'query' => [
        'filtered' => [
            'filter' => [
                'term' => [ 'name' => $query ] ,
                'term' => [ 'tags' => $query ]
              ]
           ]
        ]
      ]
    ];




    $data['results'] = $this->client->search($params);
Run Code Online (Sandbox Code Playgroud)

php elasticsearch

5
推荐指数
2
解决办法
7343
查看次数

标签 统计

elasticsearch ×1

php ×1