Hi @Simon_Prudhomme,
I presume you’re expecting 0 results to be returned when using the tag ["admin"]
(assuming it doesn’t exist within any document) but correct me if I’m wrong here.
There is a similar post comment here : preFilter configuration and indexing for Langchain retriever - #4 by Prakul_Agarwal
The syntax appears a bit different to what you’ve posted. Could you provide the version of MongoDB + LangChain you are using?
You can also check via mongosh
if the filter
equivalent of your query works as expected. This might help narrow down the issue to langchain syntax etc.
Regards,
Jason