seems that you already got the solution.
I just wanna add on.
If the ids can reach 137, I think you should store the relation in Topic collection
instead. It is the other way around. The query will be
Topic.where(:id => self.topic_id)
where self refers to a record of this model.
It is actually has_many and belongs_to relationship.
Mongodb ability to store array, does not mean that for that many (137) records associated from other model you can store that way. The relational method is better.
Just put something in array if the data type is not related to other model/collection.
For example, topic tag that could be "trendy, teen, childish, cheesy, etc where you do not have a predefined tag, instead, they are defined by your users
. This is a good opportunity in using array feature with mongodb.
For your case where the array contains topic lists, where topics are data defined in Topic collection, relational model should have been used.
Just some suggestion, please do not vote me down.