# Namespace not working with similarity search

**URL:** <https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366>\
**Category:** General\
**Created:** [June 21, 2023, 7:52pm UTC](https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366 "2023-06-21T19:52:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fyltl827](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/fyltl827/32/830_2.png) [@fyltl827](https://community.pinecone.io/u/fyltl827)\
**Post date:** [June 21, 2023, 7:52pm UTC](https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366/1 "2023-06-21T19:52:43Z")

</div>

If I add namespace to vectors, it doesn’t return anything when performing similarity search.  
is it because I’m on a starter plan?

---

<div class="post-metadata">

**Author:** ![dra](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/dra/32/171_2.png) [@dra](https://community.pinecone.io/u/dra)\
**Post date:** [June 22, 2023, 12:49am UTC](https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366/2 "2023-06-22T00:49:23Z")

</div>

Hello!

Firstly, the type of plan (e.g., starter) usually doesn’t impact the function of adding namespaces to vectors or performing similarity search after doing so. That is, even with a free plan, you should be able to use this functionality.

So, if nothing is being returned, it’s likely that something else is wrong. If you could provide more specific information about how you’re adding namespaces, generating vectors, the tools or libraries you’re using for the similarity search, how the process is supposed to work, and any error messages you might be seeing, I could give more specific support.

Also, could you let me know if you’re working in a specific environment, such as a particular programming language or framework, or if you’re using a specific platform or service? Knowing more about your situation would help to identify and resolve the issue.

---

<div class="post-metadata">

**Author:** ![fyltl827](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/fyltl827/32/830_2.png) [@fyltl827](https://community.pinecone.io/u/fyltl827)\
**Post date:** [June 23, 2023, 2:39am UTC](https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366/3 "2023-06-23T02:39:42Z")

</div>

Hello dra, thank you. I’m using langchain js, after creating documents which are chunks of texts. I just added those documents to pinecone with namespaces by using langchain library. After adding, I just called similaritySearch from langchain library, but nothing is returned.

---

<div class="post-metadata">

**Author:** ![dra](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/dra/32/171_2.png) [@dra](https://community.pinecone.io/u/dra)\
**Post date:** [June 23, 2023, 4:55am UTC](https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366/4 "2023-06-23T04:55:39Z")

</div>

Hello!

Here are several points for you to check regarding your issue:

1. **Has the index been correctly added to Pinecone?** Please make sure the addition process has been properly performed.  

2. **Is there any issue with your code itself?** In particular, verify whether the implementation of the `similaritySearch` function call is correct. If there are any uncertainties, it could be helpful to have Langchain’s AI chatbot check your specific implementation.  

> **[Welcome to LangChain | 🦜️🔗 Langchain](https://js.langchain.com/docs/)**
>
> LangChain is a framework for developing applications powered by language models. We believe that the most powerful and differentiated applications will not only call out to a language model via an API, but will also:

1. **Langchain’s official Discord server is quite active,** with numerous questions and answers exchanged that could help solve your issue. Consider sharing your problem there and seeking advice from other developers.

 ![image 185](https://us1.discourse-cdn.com/flex020/uploads/pinecone/original/1X/e35f909b75c5fbd4f135ff2241eeba9baae27998.png)

[https://twitter.com/LangChainAI](https://twitter.com/LangChainAI)

1. **Is there any issue with the version of the library you’re using?** Specifically, if it’s too old or too new, some functions might not work properly. If necessary, consider upgrading or downgrading the version.

2. **Are there any error messages being displayed?** If so, these could provide significant clues to resolve the problem.

If these points don’t help solve the issue, sharing the specific code or error messages could allow us to provide more concrete advice. Please let us know if there are any developments.

---

<div class="post-metadata">

**Author:** ![Jasper](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/jasper/32/4514_2.png) [@Jasper](https://community.pinecone.io/u/Jasper)\
**Post date:** [June 26, 2023, 9:38am UTC](https://community.pinecone.io/t/namespace-not-working-with-similarity-search/2366/5 "2023-06-26T09:38:01Z")

</div>

Hi @fyltl827

do make sure you add the namespace as a parameter to the similarity search method 🙂

Hope this helps
