Exercise/FOQElasticaBundle — pull request #151 by geecu (2012-08-10 09:10:13+00:00)
Title: fix search command when no index option is passed

when searching from command line and providing no index, FOQElasticaBundle throws an exception (The index "" does not exist - () at /project/vendor/exercise/elastica-bundle/FOQ/ElasticaBundle/IndexManager.php:46).

First, if no --index option is given, $input->getOption('index') returns false, while IndexManager's getIndex only uses the defaultIndexName if the index name is null.

Second, the dependency passed to IndexManager's constructor as the second argument is the default index, not its name.