MongoEngine query list for objects having properties starting with prefixes specified in a list
问题 I need to query Mongo database for elements that have a certain property beginning with any prefix in the list. Now I have a piece of code like this: query = mymodel(terms__term__in=query_terms) and this matches objects that have an item on a list "terms" that has StringField "term" explicitly occurring on a list "query_terms". What I want to achieve is having objects that have an item on a list "terms" that has StringField "term" beginning with any prefix that occurs on a list "query_terms".