Description
Originally on SO.
I'm trying to run aggregate with projection but i get NotSupportedException: $project or $group does not support <document>. I am running version 2.4.4 of driver with mongodb v3.4.
var filter = Builders<T>.Filter.Regex(x=>x.Value,"/test/gi"); |
|
|
var aggregate = collection.Aggregate() |
.Match(filter)
|
.Project(x => new |
{
|
Idx = x.Value.IndexOf("test"), |
Result = x
|
}
|
.SortBy(x => x.Idx);
|
I thought IndexOfCP is supported.
What am i doing wrong here?
Attachments
Issue Links
- duplicates
-
CSHARP-2071 Using Linq Aggregation to project the root document
-
- Closed
-
- related to
-
CSHARP-2071 Using Linq Aggregation to project the root document
-
- Closed
-