2012-12-28 24 views
0

我正在爲我的項目使用Symfony 2.1。在我的項目中,elasticsearch將用於我的搜索引擎。我發現Elastica是彈性搜索的PHP客戶端。 ElasticBundle是symfony2.0的Elastica包裝器。我遵循一步一步的正式文檔https://github.com/Exercise/FOQElasticaBundle#readme。但似乎文件已過時。我認爲這是爲了symfony2。我試圖與symfony2.1進行整合,但沒有成功。非常感謝您的幫助。在Symfony2.1中安裝ElasticBundle

回答

2

我不喜歡的是,添加一行:

//composer.json 
... 
"require": { 
    ... 
    "exercise/elastica-bundle": "dev-master", 
} 
... 

然後我跑php composer.phar update。然後添加一行:

//app/AppKernel.php 
... 
    new FOQ\ElasticaBundle\FOQElasticaBundle(), 
... 
+0

我幾天前找到了同樣的方法。這是非常直接的。不管怎樣,謝謝。 –