sidus/elastica-filter-bundle

用于处理Elastic Search索引搜索的sidus/filter-bundle扩展

v3.0.0 2021-02-17 17:52 UTC

This package is auto-updated.

Last update: 2024-09-18 01:28:28 UTC


README

此包是sidus/filter-bundle的扩展,它可以在查询处理器中启用Elastic Search索引搜索。

安装

遵循FOS/ElasticaBundle的安装指南

配置

配置您要搜索的数据对应的索引。

在您的过滤器配置中,将提供者设置为sidus.elastica,并在选项中设置reference选项为fos_elastica.finder.{{name_of_your_index}}.{{name_of_your_type}}

示例

带有Doctrine ORM实体的示例

fos_elastica:
    indexes:
        my_index:
            types:
                my_type:
                    properties:
                        id:
                            type: integer
                        label:
                            type: keyword
                    persistence:
                        driver: orm
                        model: MyBundle\Entity\MyEntity

过滤器配置

sidus_filter:
    configurations:
        my_entity:
            provider: sidus.elastica
            options:
                reference: fos_elastica.finder.my_index.my_type
            sortable:
                - id
                - label
            filters:
                label: ~

支持的过滤器

@todo

选择

日期范围

文本