Docs Menu
Docs Home
/
IntelliJ Plugin
/

Java Driver Methods to Generate Insights

When you use the following Java Driver method calls in your queries, the MongoDB for IntelliJ Plugin generates insights for your workspace, including insights regarding index warnings, type validation, or database reference validation. If your query contains a combination of methods the IntelliJ Plugin can generate insights from and methods that the IntelliJ Plugin cannot generate insights from, the IntelliJ Plugin does not generate any insights.

Name
Description

MongoCollection.find()

Finds all documents in the collection.

Aggregates documents according to the specified aggregation pipeline.

Name
Description

Creates a filter that matches all documents where the value of the field name equals the specified value.

Creates a filter that matches all documents where the value of the given field is greater than the specified value.

Creates a filter that matches all documents where the value of the given field is greater than or equal to the specified value.

Creates a filter that matches all documents where the value of the given field is less than the specified value.

Creates a filter that matches all documents where the value of the given field is less than or equal to the specified value.

Creates a filter that matches all documents where the value of the field name does not equal the specified value.

Creates a filter that matches all documents where the value of a field equals any value in the list of specified values.

Creates a filter that matches all documents where the value of a field does not equal any of the specified values or does not exist.

Creates a filter that performs a logical AND of the provided list of filters.

Creates a filter that preforms a logical OR of the provided list of filters.

Creates a filter that performs a logical NOR operation on all the specified filters.

Creates a filter that matches all documents that do not match the passed in filter.

Creates a filter that matches all documents that contain the given field.

Name
Description

Creates a $match pipeline stage that matches incoming documents against the specified query filter, filtering out documents that do not match.

Creates a $project pipeline stage that project specified document fields.

Creates a $sort pipeline stage to sort by the specified criteria.

Creates a $group pipeline stage to group documents by a specified expression and output a document for each distinct grouping.

Creates an $addFields pipeline stage that adds new fields to documents.

Creates an $unwind pipeline stage to deconstruct an array field from input documents, creating an output document for each array element.

Creates a $limit pipeline stage for the specified filter.

Name
Description

Gets a field name for a $group operation representing the sum of the values of the given expression when applied to all members of the group.

Gets a field name for a $group operation representing the average of the values of the given expression when applied to all members of the group.

Gets a field name for a $group operation representing the value of the given expression when applied to the first member of the group.

Gets a field name for a $group operation representing the value of the given expression when applied to the last member of the group.

Returns a combination of a computed field and an accumulator that produces a value of the given outExpression computed for the top element within a group sorted according to the provided sortBy specification.

Returns a combination of a computed field and an accumulator that produces a BSON Array of values of the given outExpression computed for the top N elements within a group sorted according to the provided sortBy specification, where N is the positive integral value of the nExpression.

Returns a combination of a computed field and an accumulator that produces a value of the given outExpression computed for the bottom element within a group sorted according to the provided sortBy specification.

Returns a combination of a computed field and an accumulator that produces a BSON Array of values of the given outExpression computed for the bottom N elements within a group sorted according to the provided sortBy specification, where N is the positive integral value of the nExpression.

Gets a field name for a $group operation representing the maximum of the values of the given expression when applied to all members of the group.

Gets a field name for a $group operation representing the minimum of the values of the given expression when applied to all members of the group.

Gets a field name for a $group operation representing an array of all values that results from applying an expression to each document in a group of documents that share the same group by key.

Gets a field name for a $group operation representing all unique values that results from applying the given expression to each document in a group of documents that share the same group by key.

Name
Description

Creates a projection that includes all of the given fields.

Creates a projection that excludes all of the given fields.

Creates a projection that combines the list of projections into a single one. If there are duplicate keys, the last one takes precedence.

Name
Description

Create a sort specification for an ascending sort on the given fields.

Create a sort specification for a descending sort on the given fields.

Combine multiple sort specifications. If any field names are repeated, the last one takes precedence.

  • IntelliJ Insights

Back

Run Java Queries

On this page