milanpol /

改进的kunstmaan搜索组件

安装: 911

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

1.1 2021-05-28 09:35 UTC

This package is auto-updated.

Last update: 2023-08-28 14:37:00 UTC


README

用于Kunstmaan 5.x项目的Symfony组件。

安装

  1. 将仓库添加到您的composer.json中。请确保您已经将SSH密钥添加到了git.e-sites.nl。

    ...
    "repositories": [
        {
          "type": "vcs",
          "url": "https://gitlab.e-sites.nl/e-sites/kunstmaan/searchbundle.git"
        }
      ]
    ...
  2. 要求组件

    $ composer require esites/kunstmaan-search-bundle

SearchBundle

此组件扩展了Kunstmaan提供的默认搜索组件。它添加了通配符搜索支持和一些可配置的选项。

  1. 在您的AppKernel中启用此组件

  2. 以下选项目前可用于配置(以它们的当前默认值设置)

    esites_kunstmaan_search:
        use_prefix_wildcard: true
        use_suffix_wildcard: true
        minimum_percentage_should_match_word_in_title: 80
        minimum_percentage_should_match_word_in_content: 80
        boost_tier_query_content_with_wildcard: 1
        boost_tier_query_content_without_wildcard: 2
        boost_tier_query_title_with_wildcard: 3
        boost_tier_query_title_without_wildcard: 4
        minimum_amount_of_characters_to_start_search: 3
        additional_fields:
           -
              name: intro (required if additional_fields is defined)
              fragment_size: 100 (not required, default = 100)
              number_of_fragments: 3 (not required, default = 3)
           -
              name: description
              fragment_size: 200
              number_of_fragments: 2