将Search-SphinxsearchBundle集成到Symfony中

时间:2013-10-07 13:29:56

标签: php symfony python-sphinx documentation-generation

我正在使用Symfony标准, 我已经安装了Search-SphinxsearchBundle

我假设,我会在控制器中使用它的服务来获取我的 app / Resources / docs 中的文档,其中有index.srt,我需要知道如何指导bundle进行搜索从我的文件夹。

我想用它来查询app / Resources / docs中的index.srt文档。 我坚持使用app / config / config.yml

sphinxsearch:
    indexes:
        - name: books
          index:
              - %sphinxsearch_index_books%
          field_weights:
              label: 10
              content: 5

我收到了这个错误:

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException' 
with message 'You have requested a non-existent parameter "sphinxsearch_index_pages".' 
in /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:108 Stack trace: 
#0 /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(234): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->get('sphinxsearch_in...') 
#1 /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(205): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveString('%sphinxsearch_i...', Array) 
#2 /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php(195): Symfony\Component\DependencyInjection\ParameterBag\ParameterBag->resolveValue('%sphinxsearch_i...', Array) 
#3 /usr/local/dev/hris/vendo in /usr/local/dev/hris/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 108

0 个答案:

没有答案