ride/app-orm-elastic 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ride/app-orm-elastic

Composer 安装命令:

composer require ride/app-orm-elastic

包简介

Elastic search integration for the Ride ORM.

README 文档

README

This module will integrate Elasticsearch into the ORM.

To enable Elastic on your model, add the behaviour.elastic property to your model options. Set it to the index/type of your data in the Elasticsearch server eg. geo/locations.

When this behaviour is enabled, a method getElasticDocument will be generated in your entry class. This method will make the conversion between the ORM and Elastic.

The mapping to Elastic is based on your model definition. You can skip fields by adding the elastic.omit option to the field.

You will need the Elastic ORM commands for the CLI to define the mapping and to index existing records. Whenever a manipulation is done (insert, update or delete), the index is automatically updated.

Note: when you enable the json API, you can add the elastic filter to add search through Elastic.

<model name="GeoLocation">
    <field name="path" type="string">
        <validation name="required"/>
    </field>
    <field name="parent" model="GeoLocation" relation="belongsTo">
        <option name="elastic.omit" value="true"/>
    </field>
    <field name="name" type="string" localized="true">
        <validation name="required"/>
    </field>

    <option name="behaviour.elastic" value="geo/locations"/>
    <option name="json.api" value="geo-locations"/>
    <option name="json.api.filters" value="query,exact,match,expression,elastic"/>
</model>

Related Modules

Installation

You can use Composer to install this application.

composer require ride/app-orm-elastic

统计信息

  • 总下载量: 94
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 9
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固