# Problems filtering by metadata

**URL:** <https://community.pinecone.io/t/problems-filtering-by-metadata/6705>\
**Category:** General\
**Tags:** semantic-search, vector-database\
**Created:** [October 1, 2024, 1:42pm UTC](https://community.pinecone.io/t/problems-filtering-by-metadata/6705 "2024-10-01T13:42:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![info10](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/info10/32/3294_2.png) [@info10](https://community.pinecone.io/u/info10)\
**Post date:** [October 1, 2024, 1:42pm UTC](https://community.pinecone.io/t/problems-filtering-by-metadata/6705/1 "2024-10-01T13:42:29Z")

</div>

Hello guys,

I have created a namespace “Test Vector”. In this namespace there are some vectors with various metadata.  
Now when I search for metadata, I have the following problem:  
My search string looks like this:  
{“Item name”:{“$in”:[“This is an item name for the item 0815”]}}  
If I enter the string like this, I get the correct article.

If I create the filter like this:  
{“Artikelbezeichnung”:{“$in”:[“Artikel 0815”]}}  
I get NO result.

I thought “$in” means that the string occurs in the metadata. in the first case it would be the same, i.e. $eq.

Does anyone of you have any idea how I have to apply the filter so that I can also search for fragments?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![evan\_pinecone](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/evan_pinecone/32/3023_2.png) [@evan\_pinecone](https://community.pinecone.io/u/evan_pinecone)\
**Post date:** [October 3, 2024, 3:48pm UTC](https://community.pinecone.io/t/problems-filtering-by-metadata/6705/2 "2024-10-03T15:48:07Z")

</div>

@info10 ,

Welcome to the community forum!

The `$in` filter matches vectors with metadata values that are in a specified array (see [Metadata query language](https://docs.pinecone.io/guides/data/filter-with-metadata#metadata-query-language)).

`{“Artikelbezeichnung”:{“$in”:[“Artikel 0815”]}}` matches vectors with the metadata value `"Artikel 0815"`, since that is the only item in the array.

We do not currently support metadata filtering by a substring, only the exact string (`$eq`) or one of many strings in an array (`$in`).

Best,

Evan

---

<div class="post-metadata">

**Author:** ![info10](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/info10/32/3294_2.png) [@info10](https://community.pinecone.io/u/info10)\
**Post date:** [October 3, 2024, 5:27pm UTC](https://community.pinecone.io/t/problems-filtering-by-metadata/6705/3 "2024-10-03T17:27:52Z")

</div>

ah ok - got it. Thanks
