Does metadata filtering have the same behavior as namespace?

When using namespaces we have to give the namespace argument while searching within a namespace, otherwise the retriever will search only for those embeddings which are not assigned to a namespace.

Does the same principle apply to metadata?

Let’s say I have 5 vectors with a metadata assigned, and 5 without.

If I run a query with a retriever but without any metadata filters, will it go through all the 10 vectors for finding the correct answer or will it only search among the 5 vectors which do not have any metadata?

Same question for the inverse scenario, where I search with a metadata filter. Will it consider all 10 vectors or only the 5 with metadata?