I'm trying to get a set of documents from my GCP Firestore collection with a query where the document id is IN an array of strings. I see it's possibile with other languages but I can't find a solution for Golang.
I'm trying the following:
Collection("myCollection").Where(firestore.DocumentID, "in", []string{"id1", "id2", "id3"}).Documents(ctx)
but I have the following error:
{
"code": 3,
"message": "__key__ filter value must be a Key"
}
I think it's not a best practice to save the document id as field of the document itself but it would reduce the complexity of the query and it would be a workaround. What do you think ? Any suggestion ?