jipipayo/sphinx-config-builder 问题修复 & 功能扩展

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

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

jipipayo/sphinx-config-builder

Composer 安装命令:

composer require jipipayo/sphinx-config-builder

包简介

A php class to build the sphinx search configuration file dynamically.

README 文档

README

A php class to build the sphinx search configuration file dynamically from php.

Why this class?

Sphinx search (http://sphinxsearch.com/) usually works well with a simple plain text file with the configuration data used by searchd and indexer. But sometimes in big projects you have to handle with this file that starts to grow, and run in different machines or environments. You finally duplicate this file and loosing the control of the real state of this changes.

Readed this tweet and gave me the idea to pass a file on the fly as configuration: https://twitter.com/pda/status/7368710004154368

With SphinxConfiguratorBuilder you create sphinx configurations dinamically: differents db confs, dev environment or prod, automatize, add to CI flows, smoke tests, etc...

Install

You can install with composer: https://getcomposer.org/ Simply add this line to your composer.json (required section):
    "jipipayo/sphinx-config-builder": "dev-master"

update your composer modules in your project:

composer update

this will download and install this class and you are ready to start to use it.

How to use it?

Open the file config_sample.php, you will see a sample use case, modify this file and save it as sphinx_config.php (or other name) add the SphinxConfiguratorBuilder to your project path.

Do not forget to start your sphinx_config.php file with the shebang as shown in the config_sample.php file:

#!/usr/bin/env  php

now simply run:

indexer --config /path/to/config_sample.php --all --rotate

or

searchd --config /absolute/path/to/config_sample.php

if you make a symlink like this:

    ln -s /absolute/path/to/config_sample.php /usr/local/etc/sphinx.conf

now you will be able to use indexer and searchd without --config path (sphinx now takes the default /usr/local/etc/sphinx.conf)

    indexer  --all --rotate

Inspired by this cpan module in perl : https://metacpan.org/pod/Sphinx::Config::Builder

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固