glicer / search
自动完成、搜索和实时输入浏览
dev-master
2015-10-24 11:21 UTC
Requires
- php: >=5.4
- symfony/console: 2.3.*
- symfony/filesystem: 2.3.*
- symfony/finder: 2.3.*
- symfony/stopwatch: 2.3.*
- symfony/yaml: 2.3.*
Requires (Dev)
- phpunit/phpunit: ~4.0
- symfony/process: 2.3.*
This package is not auto-updated.
Last update: 2024-09-14 17:48:18 UTC
README
使用javascript(客户端)和php(服务器端)的实时全文搜索解决方案
实时自动完成、搜索和实时输入浏览
它支持
查看 演示。
欢迎反馈
服务器端
导入数据
数据必须是yaml格式,一些示例在 tests/server/data
<?php use Symfony\Component\Console\Output\ConsoleOutput; use GlSearchEngine\GlServerEngine; $output = new ConsoleOutput(); $yamlFiles = [__DIR__ . "/data/web.yml", __DIR__ . "/data/web2.yml"]; //yaml files list to import in database $dbname = __DIR__ . "/data/web.db"; //database path $table = "web"; //prefix table name $fieldsFullText = ['title', 'tags', 'description', 'address', 'city']; //fields list to fulltext search $fieldsFilter = ['gps']; //fields list possibly used to filter $engine = new GlServerEngine($dbname, $output, true); $engine->importYaml( $table, $fieldsFilter, $fieldsFullText, $yamlFiles, function () use ($output) { //callback function to each import $output->write("."); } );
服务
配置Apache服务器
允许通过同一TCP连接发送多个请求
设置头为Connection Keep-Alive客户端
运行客户端/服务器测试
从命令行启动
vendor\bin\phpunit
待办事项
排名/排序
许可证
GNU 2
联系
作者:Emmanuel ROECKER & Rym BOUCHAGOUR