Return only array items that matches $text

I think you are looking to return something like this: { name: "shoes", description: "nice shoes" }.

You use a projection to limit the fields to be in the result document. But, when you have to project only a filtered set of array elements, the find method has a limited use. Using $elemMatch projection operator you can project only the first matching element.

To project all the matching items use the aggregate method on the collection. Aggregation has $project and this can be used with the $filter array operator to get all the matching array elements. Another way is, to use a combination of $unwind, $match and $project stages.

[ EDIT ADD ]

Here is the link to a post with an example aggregate query about using the $filter on an array: Java driver - $filter aggregation operator