# How to implement "suggest", with JavaClient

**URL:** <https://discuss.elastic.co/t/how-to-implement-suggest-with-javaclient/92668>\
**Category:** Elasticsearch\
**Created:** [July 11, 2017, 2:20pm UTC](https://discuss.elastic.co/t/how-to-implement-suggest-with-javaclient/92668 "2017-07-11T14:20:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![miya1](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@miya1](https://discuss.elastic.co/u/miya1)\
**Post date:** [July 11, 2017, 2:20pm UTC](https://discuss.elastic.co/t/how-to-implement-suggest-with-javaclient/92668/1 "2017-07-11T14:20:34Z")

</div>

I'd like to run it with "suggest" JavaClient below.

```
{
    "suggest": {
        "my-suggestion-1": {
            "text": "sample",
            "completion": {
                "field": "suggest1",
                "size": 10
            }
        }
    }
}

```

I could not find the document.

Please let me know the URL of the document.  
Also, how should I implement it?

Someone, please lend me your wisdom.

# Environment

- Language: Java 8
- Framework: Spring  
\*Elasticsearch client (jar) ver
  - Org.elasticsearch: 5.1.1
  - Org.elasticsearch.client: 5.1.1

- Elasticsearch's ver: 5.3.1

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 11, 2017, 3:44pm UTC](https://discuss.elastic.co/t/how-to-implement-suggest-with-javaclient/92668/2 "2017-07-11T15:44:28Z")

</div>

May be have a look at the Java tests?

Like:

> <https://github.com/elastic/elasticsearch/blob/master/core/src/test/java/org/elasticsearch/search/suggest/SuggestSearchIT.java#L84>

---

<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:** [August 8, 2017, 3:44pm UTC](https://discuss.elastic.co/t/how-to-implement-suggest-with-javaclient/92668/3 "2017-08-08T15:44:35Z")

</div>

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