driver-core/src/main/com/mongodb/client/model/Filters.java
public static <TItem> Bson ne(final String fieldName, @Nullable final TItem value) {
        return new OperatorFilter<TItem>("$ne", fieldName, value);
    }
public static <TItem> Bson ne(final String fieldName, @Nullable final TItem value) {
        return new OperatorFilter<TItem>("$ne", fieldName, value);
    }
Creates a filter that matches all documents where the value of the field name does not equal the specified value.

@param fieldName the field name
@param value     the value, which may be null
@param <TItem>   the value type
@return the filter
@mongodb.driver.manual reference/operator/query/ne $ne