Skip to content

How to use filter_docs with multiple filter from the same key (bug?) #1749

Answered by JoanFM
simonschoenhofen asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @simonschoenhofen .

I finally got time to look at this issue.

This does not seem to be a bug, since the query is a dictionary, a dictionary cannot contain 2 entries of the same key and this is why docarray only sees one of the entries.

I would say that the query should be designed differently using the nin (not in a set) clause:

query = {
'test_index' : {'$nin' : [3, 9]},
}

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@simonschoenhofen
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@simonschoenhofen
Comment options

@JoanFM
Comment options

@simonschoenhofen
Comment options

Answer selected by JoanFM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy