triadev/laravel-elasticsearch-config-builder 问题修复 & 功能扩展

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

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

triadev/laravel-elasticsearch-config-builder

Composer 安装命令:

composer require triadev/laravel-elasticsearch-config-builder

包简介

Elasticsearch config (mappings + settings) builder for laravel.

README 文档

README

Software license Travis Coveralls CodeCov Latest stable Latest development Monthly installs

Elasticsearch config (mappings + settings) builder for laravel.

Supported laravel versions

Laravel 5.5 Laravel 5.6 Laravel 5.7

Supported elasticsearch versions

Elasticsearch 6.0 Elasticsearch 6.1 Elasticsearch 6.2 Elasticsearch 6.3 Elasticsearch 6.4

Main features

  • Build mappings
  • Build settings
  • Multilanguage keys
  • Multilanguage indices
  • Mapping validation check

Installation

Composer

composer require triadev/laravel-elasticsearch-config-builder

Application

The package is registered through the package discovery of laravel and Composer.

https://laravel.com/docs/5.6/packages

Configuration

Key Value Description
filePath STRING File path for elasticsearch configs
validation.whitelistFilter ARRAY ---
indices ARRAY [INDEX => VERSION, ...]

Mappings

Directory (i.e. 1.0.0) with elasticsearch config files.

mappings.php (Example)

return [
    TYPE => [
        'properties' => [
            FIELD => [
                'type' => TYPE
            ],
            ...
        ],
        ...
    ],
    ...
];

settings.php (Example)

return [
    'refresh_interval' => "30s",
    'analysis' => [
        'filter' => [
            'germanStop' => [
                'type' => 'stop',
                'stopwords' => '_german_'
            ]
        ],
        'analyzer' => [
            'exampleAnalyzer' => [
                'type' => 'custom',
                'tokenizer' => 'standard',
                'filter' => [
                    'germanStop'
                ]
            ]
        ]
    ]
];

translations.php (Example)

Key Value Description
type STRING field or index
locales ARRAY deDE, enUS, ...
fields ARRAY fields to translation
configPerLocale ARRAY ---
return [
    'type' => 'field',
    'locales' => [
        'enUS'
    ],
    'fields' => [
        'example.properties.title'
    ],
    'configPerLocale' => [
        'example.properties.title' => [
            'enUS' => [
                'analyzer' => 'exampleAnalyzerEn'
            ]
        ]
    ]
];

Reporting Issues

If you do find an issue, please feel free to report it with GitHub's bug tracker for this project.

Alternatively, fork the project and make a pull request. :)

Testing

  1. docker-compose -f docker-compose.yml up
  2. composer test

Contributing

Please see CONTRIBUTING for details.

Credits

Other

Project related links

License

The code for LaravelElasticsearchConfigBuilder is distributed under the terms of the MIT license (see LICENSE).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固