# Connecting using Symfony2 FOSElasticaBundle

**URL:** <https://discuss.elastic.co/t/connecting-using-symfony2-foselasticabundle/73865>\
**Category:** Elasticsearch\
**Created:** [February 3, 2017, 1:58pm UTC](https://discuss.elastic.co/t/connecting-using-symfony2-foselasticabundle/73865 "2017-02-03T13:58:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sofien.000](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@sofien.000](https://discuss.elastic.co/u/sofien.000)\
**Post date:** [February 3, 2017, 1:58pm UTC](https://discuss.elastic.co/t/connecting-using-symfony2-foselasticabundle/73865/1 "2017-02-03T13:58:48Z")

</div>

HI. I am using Elasticsearch 1.5.2. I add this code in app/config/config.yml

```
fos_elastica:
    clients:
        default: { host: localhost, port: 9200 }
    serializer:
        callback_class: FOS\ElasticaBundle\Serializer\Callback
        serializer: serializer
    indexes:
        afsy:
            client: default
            types:
                Article:
                    mappings: ~
                    persistence:
                        driver: orm # orm, mongodb, propel are available
                        model: Afsy\Bundle\CoreBundle\Entity\Article
                        provider: ~
                Author:
                    mappings: ~
                    persistence:
                        driver: orm
                        model: Afsy\Bundle\CoreBundle\Entity\Author
                        provider: ~

```

and I try this command

`$ php app/console fos:elastica:populate`

I get this error

`[invalidArgumentException] there are no commands defined in the "fos:elastica" namespace`

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [February 3, 2017, 10:17pm UTC](https://discuss.elastic.co/t/connecting-using-symfony2-foselasticabundle/73865/2 "2017-02-03T22:17:20Z")

</div>

I don't know the answer, but I suspect you'll have better luck opening a ticket in the FOSElasticaBundle repo and asking there. I doubt the developers browse this forum often, and I don't think many here will have much experience with that bundle. Goodluck 🙂

---

<div class="post-metadata">

**Author:** ![sofien.000](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@sofien.000](https://discuss.elastic.co/u/sofien.000)\
**Post date:** [February 15, 2017, 8:13am UTC](https://discuss.elastic.co/t/connecting-using-symfony2-foselasticabundle/73865/3 "2017-02-15T08:13:02Z")

</div>

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 15, 2017, 8:13am UTC](https://discuss.elastic.co/t/connecting-using-symfony2-foselasticabundle/73865/4 "2017-03-15T08:13:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
