Frank's answer is good but Firestore introduced array-contains
recently that makes it easier to do AND queries.
You can create a filters
field to add you filters. You can add as many values as you need. For example to filter by comedy and Jack Nicholson you can add the value comedy_Jack Nicholson
but if you also you want to by comedy and 2014 you can add the value comedy_2014
without creating more fields.
{
"movies": {
"movie1": {
"genre": "comedy",
"name": "As good as it gets",
"lead": "Jack Nicholson",
"year": 2014,
"filters": [
"comedy_Jack Nicholson",
"comedy_2014"
]
}
}
}