milanpol / kunstmaan-search-bundle
改进的kunstmaan搜索组件
1.1
2021-05-28 09:35 UTC
Requires
- php: >=7.2
- kunstmaan/bundles-cms: ^5.0
README
用于Kunstmaan 5.x项目的Symfony组件。
安装
-
将仓库添加到您的composer.json中。请确保您已经将SSH密钥添加到了git.e-sites.nl。
... "repositories": [ { "type": "vcs", "url": "https://gitlab.e-sites.nl/e-sites/kunstmaan/searchbundle.git" } ] ...
-
要求组件
$ composer require esites/kunstmaan-search-bundle
SearchBundle
此组件扩展了Kunstmaan提供的默认搜索组件。它添加了通配符搜索支持和一些可配置的选项。
-
在您的AppKernel中启用此组件
-
以下选项目前可用于配置(以它们的当前默认值设置)
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