e1on/omines-datatables-elasticsearch-adapter-bundle
最新稳定版本:1.0.4
Composer 安装命令:
composer require e1on/omines-datatables-elasticsearch-adapter-bundle
包简介
Elasticsearch adapter with search_after feature for DataTable Omines bundle
README 文档
README
This bundle provides integration between Elasticsearch and the DataTable bundle for Symfony, enabling efficient querying of Elasticsearch indices and fetching results using the search_after feature. This allows for pagination and quick processing of large volumes of data presented in the DataTable format, leveraging the powerful search capabilities of Elasticsearch.
Install
composer require e1on/omines-datatables-elasticsearch-adapter-bundle
Rules
- Setting a name for a DataTable is required
- Uniq DataTable name for each table
Using
use E1on\OminesDatatablesElasticsearchAdapterBundle\ElasticaAdapter; $table = $this->createDataTable() ->setName('log') ->add('timestamp', DateTimeColumn::class, ['field' => '@timestamp', 'format' => 'Y-m-d H:i:s', 'orderable' => true]) ->add('level', MapColumn::class, [ 'default' => '<span class="label label-default">Unknown</span>', 'map' => ['Emergency', 'Alert', 'Critical', 'Error', 'Warning', 'Notice', 'Info', 'Debug'], ]) ->add('message', TextColumn::class, ['globalSearchable' => true]) ->createAdapter(ElasticaAdapter::class, [ 'client' => ['host' => 'elasticsearch'], 'index' => 'logstash-*', ]);
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-26