Example usage for com.mongodb.client.model Projections elemMatch

List of usage examples for com.mongodb.client.model Projections elemMatch

Introduction

In this page you can find the example usage for com.mongodb.client.model Projections elemMatch.

Prototype

public static Bson elemMatch(final String fieldName) 

Source Link

Document

Creates a projection that includes for the given field only the first element of an array that matches the query filter.

Usage

From source file:mongodb.clients.percunia.mongo.Projection.java

License:Apache License

public static Bson elematch(String field) {
    return Projections.elemMatch(field);
}