es 拼音插件安装/php客户端调用es

 
更多

elasticsearch-analysis-pinyin

php客户端调用es

  • php客户端调用es
    1.在 https://packagist.org/搜索elasticsearch

    2.通过composer安装:
    composer require elasticsearch/elasticsearch

    安装composer参考:http://docs.phpcomposer.com/01-basic-usage.html#Installation
    3.配置_rg/res.yml
    配置res
    4.连接
    连接

    5.使用
    class EsSvc extends Svc
    {
    public function testEs(){
    $params = [
    ‘index’ => ‘wcloud’,
    ‘type’ => ‘1035346’,
    ‘id’ => ‘1498579190’
    ];
    $response = Svc::getEsInstance()->get($params);
    return $response;
    }
    }

    从索引(index)为wcloud、类型(type)为1035346中查找id为1498579190的一条记录
    6.返回结果
    php调用es返回结果

打赏

本文固定链接: https://www.cxy163.net/archives/2613 | 绝缘体

该日志由 绝缘体.. 于 2024年01月27日 发表在 未分类 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: es 拼音插件安装/php客户端调用es | 绝缘体
关键字: , , , ,

es 拼音插件安装/php客户端调用es:等您坐沙发呢!

发表评论


快捷键:Ctrl+Enter