# Termsuggester in new Elasticsearch client library

**URL:** https://discuss.elastic.co/t/termsuggester-in-new-elasticsearch-client-library/343070
**Category:** Elasticsearch
**Created:** [September 14, 2023, 6:33pm UTC](https://discuss.elastic.co/t/termsuggester-in-new-elasticsearch-client-library/343070 "2023-09-14T18:33:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ramyogi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyogi/32/120207_2.png) [@ramyogi](https://discuss.elastic.co/u/ramyogi)
#### Post date: [September 14, 2023, 6:33pm UTC](https://discuss.elastic.co/t/termsuggester-in-new-elasticsearch-client-library/343070/1 "2023-09-14T18:33:33Z")

</div>

We could not find any option to supply accuracy with term suggest. But Elasticsearch core lib provided that option.

[https://www.javadoc.io/doc/org.elasticsearch/elasticsearch/latest/org.elasticsearch.server/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.html#accuracy()](https://www.javadoc.io/doc/org.elasticsearch/elasticsearch/latest/org.elasticsearch.server/org/elasticsearch/search/suggest/term/TermSuggestionBuilder.html#accuracy())

same we cannot achieve with new client lib of

> **[TermSuggester (java-client 8.9.0 API)](https://artifacts.elastic.co/javadoc/co/elastic/clients/elasticsearch-java/8.9.0/co/elastic/clients/elasticsearch/core/search/TermSuggester.html)**
>
> declaration: package: co.elastic.clients.elasticsearch.core.search, class: TermSuggester

Any help is greatly appreciated.

---

<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: [September 14, 2023, 8:38pm UTC](https://discuss.elastic.co/t/termsuggester-in-new-elasticsearch-client-library/343070/2 "2023-09-14T20:38:02Z")

</div>

I don't know if this `accuracy()` method is supposed to be used. It's not documented in the API. See [Suggesters | Elasticsearch Guide [8.10] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html#term-suggester)

That's why I guess it's not in the new API. I'm thinking of it as an internal setting or even worse, not used ;).

May be an Elasticsearch dev could comment on that?

---

<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: [October 12, 2023, 8:38pm UTC](https://discuss.elastic.co/t/termsuggester-in-new-elasticsearch-client-library/343070/3 "2023-10-12T20:38:21Z")

</div>

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