# Does filtering based on property effectively scope vector search?

**URL:** <https://forum.weaviate.io/t/does-filtering-based-on-property-effectively-scope-vector-search/814>\
**Category:** General\
**Tags:** developer-experience\
**Created:** [October 12, 2023, 3:04am UTC](https://forum.weaviate.io/t/does-filtering-based-on-property-effectively-scope-vector-search/814 "2023-10-12T03:04:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roengram](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/roengram/32/564_2.png) [@roengram](https://forum.weaviate.io/u/roengram)\
**Post date:** [October 12, 2023, 3:04am UTC](https://forum.weaviate.io/t/does-filtering-based-on-property-effectively-scope-vector-search/814/1 "2023-10-12T03:04:30Z")

</div>

Hi, I’m curious whether the vector search with filtering on property means vector search among only those objects meeting filtering condition. This question occurred to me when I read Pinecone doc saying

“Searches with metadata filters retrieve exactly the number of nearest-neighbor results that match the filters.” ([Filtering with metadata](https://docs.pinecone.io/docs/metadata-filtering))

This actually boils down to whether I could scope vector search within objects matching the filtering condition. Let’s say we have a class “book”, and one of its property is subcategory like “novel” or “non-fiction”. In case I’d like to perform vector search only WITHIN novels, the filtering should be done BEFORE vector search. So, how Weaviate is doing?

---

<div class="post-metadata">

**Author:** ![trengrj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/trengrj/32/49_2.png) [@trengrj](https://forum.weaviate.io/u/trengrj)\
**Post date:** [October 12, 2023, 12:53pm UTC](https://forum.weaviate.io/t/does-filtering-based-on-property-effectively-scope-vector-search/814/2 "2023-10-12T12:53:48Z")

</div>

> Hi, I’m curious whether the vector search with filtering on property means vector search among only those objects meeting filtering condition.

Yes that is correct. Please see these docs for the approach [Filtering (with search) | Weaviate - vector database](https://weaviate.io/developers/weaviate/concepts/prefiltering#introduction). Weaviate uses pre-filtering but in edge cases where the filter is very restrictive it will also skip the hnsw index and use brute force instead.
