# How to use hnsw\_config with pinecone API?

**URL:** <https://community.pinecone.io/t/how-to-use-hnsw-config-with-pinecone-api/1594>\
**Category:** Support\
**Created:** [April 28, 2023, 1:27pm UTC](https://community.pinecone.io/t/how-to-use-hnsw-config-with-pinecone-api/1594 "2023-04-28T13:27:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marty.patrick](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/marty.patrick/32/394_2.png) [@marty.patrick](https://community.pinecone.io/u/marty.patrick)\
**Post date:** [April 28, 2023, 1:27pm UTC](https://community.pinecone.io/t/how-to-use-hnsw-config-with-pinecone-api/1594/1 "2023-04-28T13:27:01Z")

</div>

Hi,

The pinecone python client has a class named [HnswConfig](https://github.com/pinecone-io/pinecone-python-client/blob/main/pinecone/core/client/model/hnsw_config.py) that exposes the ef\_construction, m and ef parameters of hnsw

How can I use those parameters when creating an index or making a query?

Thanks

---

<div class="post-metadata">

**Author:** ![kyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/kyler/32/1538_2.png) [@kyler](https://community.pinecone.io/u/kyler)\
**Post date:** [October 18, 2023, 1:55pm UTC](https://community.pinecone.io/t/how-to-use-hnsw-config-with-pinecone-api/1594/2 "2023-10-18T13:55:45Z")

</div>

Hi @marty.patrick, this class is unused. If you search within the repo you shouldn’t find it utilized anywhere and will likely be removed in a coming release. The class may have been accidentally auto-generated by an upstream processes. Apologies for the confusion and delay in response on this!

---

<div class="post-metadata">

**Author:** ![kyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/kyler/32/1538_2.png) [@kyler](https://community.pinecone.io/u/kyler)\
**Post date:** [October 18, 2023, 1:55pm UTC](https://community.pinecone.io/t/how-to-use-hnsw-config-with-pinecone-api/1594/3 "2023-10-18T13:55:52Z")

</div>

Closed on October 18, 2023, 1:55pm UTC


