本项目以limingxinleo/phalcon-project为基础,进行简易封装。
composer require elasticsearch/elasticsearch
# 查看文档目录
php run es:main
- sort关键字,bool.must、bool.filter ... 里需要插入数组 例如:
$params = [
'index' => ES::ES_INDEX,
'type' => ES::ES_TYPE_USER,
'body' => [
'query' => [
'bool' => [
'must' => [
['match' => ['name' => '小王']],
['term' => ['book.author' => 'limx']],
],
'filter' => [
['geo_distance' => [
'distance' => '1km',
'location' => [
'lat' => $lat,
'lon' => $lon
],
]],
],
],
],
'from' => 0,
'size' => 5,
'sort' => [
['_geo_distance' => [
'location' => [
'lat' => $lat,
'lon' => $lon
],
'order' => 'asc',
'unit' => 'km',
'mode' => 'min',
]],
[
'randnum' => 'desc',
]
],
],
];
$ composer create-project limingxinleo/phalcon-basic-project
limingxinleo/phalcon-project-library
框架所用的基础扩展
用户内部服务通信的RPC扩展,基于Swoole Tcp Server & Client 开发。期待Swoole4.0协程时代的到来。
limingxinleo/x-phalcon-config-center
配置中心模块,方便配置文件分类读取
基于注解的枚举类