2017 © Pedro Peláez
 

library phpesc

php esc search

image

zouhuigang/phpesc

php esc search

  • Friday, September 1, 2017
  • by zouhuigang
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

esc库使用说明

使用方法

下载, (*1)

composer require "zouhuigang/phpesc:dev-master" 
composer remove "zouhuigang/phpesc:dev-master" //移除,但是不删除本地的库文件

想要彻底删除,可以在根目录中的composer.json将本库移除掉,然后composer update,即可删除本地库文件, (*2)

使用, (*3)

use package\phpesc as phpesc;
$esc=new phpesc\Esc();

查询数据:, (*4)

curl 'localhost:9200/accounts/person/_search'  -d '
    {
      "query" : { "match" : { "desc" : "软件" }}
    }'

esc方式:, (*5)

$esc->_search('{"query":{"match":{"desc":"软件"}}}')

新建数据:, (*6)

curl -X PUT 'localhost:9200/accounts/person/1' -d '
{
  "user": "张三",
  "title": "工程师",
  "desc": "数据库管理"
}' 

esc方式:, (*7)

$array = array('index' => 'accounts','type' => 'person','id' => '4');

$esc->create($array,'{
      "user": "张三",
      "title": "工程师",
      "desc": "数据库管理"
    }');

The Versions

01/09 2017

dev-master

9999999-dev

php esc search

  Sources   Download

MIT

The Requires

  • php ^7.0

 

by Avatar zouhuigang