linestorm / search-bundle
此包已被弃用且不再维护。未建议替代包。
无法获取此包最新版本(dev-master)的许可证信息。
LineStorm CMS 的搜索模块
dev-master
2014-06-17 00:14 UTC
Requires
- php: >=5.3.0
- symfony/symfony: >=2.3
This package is auto-updated.
Last update: 2020-04-10 17:18:26 UTC
README
LineStorm BlogBundle 的后端模块。它包含了标签、文章和画廊组件。还要求使用 linestorm/media-bundle
。
安装
此模块将为 LineStorm CMS 提供发布博客类型内容的功能。
- 使用 composer 下载包
- 启用 Bundle
- 配置 Bundle
- 安装资源
步骤 1:使用 composer 下载包
将 linestorm/search-bundle
添加到您的 composer.json
文件中,或者通过运行以下命令下载它
$ php composer.phar require linestorm/search-bundle
步骤 2:启用 Bundle
在 app/AppKernel.php
中启用 post 和 media bundles
public function registerBundles() { $bundles = array( // ... new LineStorm\SearchBundle\BlogPostBundle(), ); }
步骤 3:配置 Bundle
在 app/config/config.yml
文件中添加 line_storm_cms 命名空间和 media 命名空间中的类实体定义
line_storm_cms: ... entity_classes: ... post: Acme\DemoBundle\Entity\BlogPost post_article: Acme\DemoBundle\Entity\BlogPostArticle post_gallery: Acme\DemoBundle\Entity\BlogPostGallery post_gallery_image: Acme\DemoBundle\Entity\BlogPostGalleryImage tag: Acme\DemoBundle\Entity\BlogTag category: Acme\DemoBundle\Entity\BlogCategory user: Acme\DemoBundle\Entity\User user_group: Acme\DemoBundle\Entity\Group line_storm_media: default_provider: local_storeage
步骤 4:安装资源
如果您使用 bower,请将依赖项添加到 bower.json 中。如果不使用,则需要手动将它们添加到 web/vendor 中。
文档
请参阅 index.md
全文实现
Doctrine 不支持全文搜索,因此如果您正在使用全文提供程序,则需要将其添加到您的 app/config/config.yml
doctrine: orm: dql: string_functions: MATCH_AGAINST: LineStorm\SearchBundle\Doctrine\Extension\MatchAgainst