# FosElasticBundle: suggestion does not support \[field\]

**URL:** <https://discuss.elastic.co/t/foselasticbundle-suggestion-does-not-support-field/151890>\
**Category:** Elasticsearch\
**Created:** [October 10, 2018, 4:05pm UTC](https://discuss.elastic.co/t/foselasticbundle-suggestion-does-not-support-field/151890 "2018-10-10T16:05:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_EBEN\_HASSINE](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_eben_hassine/32/110483_2.png) [@Ahmed\_EBEN\_HASSINE](https://discuss.elastic.co/u/Ahmed_EBEN_HASSINE)\
**Post date:** [October 10, 2018, 4:05pm UTC](https://discuss.elastic.co/t/foselasticbundle-suggestion-does-not-support-field/151890/1 "2018-10-10T16:05:13Z")

</div>

Using `fos_elastica.finder.post_index.post` service to get list of [available sugesstion](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-suggesters-completion.html#fuzzy) post as defined under my mapping configuration:

```
fos_elastica:
    clients:
        default: { host: elasticsearch, port: 9200 }
    indexes:
        post_index:
            client: default
            index_name: post_index
            types:
                post:
                    properties:
                        suggest:
                            type: completion
                        id:
                            type: keyword
                        title:
                            type: keyword
                        description:
                            type: keyword

                    persistence:
                        driver: orm
                        model: App\Entity\Post
                        finder: ~
                        provider: ~
                        listener: ~

```

This is my php code under SearchController:

```
$finder = $this->container->get('fos_elastica.finder.post_index.post');

$compelation = [
        "suggest" => [
            "suggest" => [
                "text" => "test",
                "completion" => [
                    "field" => "suggest",
                    "fuzzy" => ["fuzziness" => 2]
                ],
            ]
        ]
    ];

$result = $finder->find($compelation);

```

The post request work great under kibana console and return the expected result:

```
POST post_index/_search?pretty
{
    "suggest": {
        "anything-suggest" : {
            "text" : "test",
            "completion" : {
                "field" : "suggest",
                "fuzzy" : {
                    "fuzziness" : 2
                }
            }
        }
    }
}

```

This is the error I'm getting:

> suggestion does not support [field]

---

<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:** [November 7, 2018, 4:05pm UTC](https://discuss.elastic.co/t/foselasticbundle-suggestion-does-not-support-field/151890/2 "2018-11-07T16:05:15Z")

</div>

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