Given the following documents in the ariticle collection:
{ _id: 1, words: [ "Apple", "IT", "Company", "IOS" ] }
{ _id: 2, words: [ "Google", "Android", "Search Engine","Company" ] }
Now, I wanna to query on the words field to get the documents that hit a specified number of elements in the list ["Company","Apple","IT","Google","Iphone","Smartisan"]. For example, I wanna to get the documents that hits any of 3 in the list above on field words.
How to write the query statements in pymongo, or does pymongo support query like this?