-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 8.2.3
-
Component/s: None
-
None
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
I'm getting an hard error:
Consider using $getField or $setField for a field path with '.' or '$'. :: caused by :: FieldPath field names may not start with '$', given '$computed0'.
When trying the following aggregation query:
[
{
$match:
/**
* query: The query in MQL.
*/
{
$text: {
$search: "Hello"
}
}
},
{
$sort:
/**
* Provide any number of field/order pairs.
*/
{
score: {
$meta: "textScore"
}
}
},
{
$facet:
/**
* outputFieldN: The first output field.
* stageN: The first aggregation stage.
*/
{
results: [
{
$skip: 0
},
{
$limit: 100
},
{
$project: {
foo: true
}
}
],
metadata: [
{
$count: "total"
}
]
}
}
]
On a simple collection with a text index. It works if I remove the $project phase, it doesn't give such an error