Anda dapat mencoba sesuatu seperti ini.
import static com.mongodb.client.model.Projections.excludeId;
FindIterable<Document> resultSet = db.getCollection("document").find(query).projection(excludeId());
Kecualikan Bidang Lain
import static com.mongodb.client.model.Projections.fields;
FindIterable<Document> resultSet = db.getCollection("document").find(query).projection(
fields(exclude("fieldname", "fieldvalue")));
Untuk daftar lengkap proyeksi.
http://api.mongodb.com/ java/3.0/?com/mongodb/client/model/Projections.html http://mongodb.github.io/mongo-java- driver/3.0/builders/projections/