Database
44 results found
-
the profile output in association with the $comment query operator need to have consistency across operations.
I have observed the different profile result with regard to $comment query operator in association with find and update operation respectively as follows;
find operation shows a comment on the command.filter.$comment and the command.comment field in the system.profile collection.
op: 'query',
ns: 'db101.Bets',
command: {
find: 'Bets',
filter: {
_id: ObjectId("61a9db4b3bd34e4f68fb9abc"),
'$comment': 'test-dba'
},
comment: 'test-dba',
lsid: { id: UUID("43ebee67-3184-4ede-9cee-ecca7457861a") },
'$db': 'db101'
},update operation shows a comment only on the command.q.$comment field in the system.profile collection.
op: 'update',
ns: 'db101.Bets',
command: {
q: {
_id: ObjectId("61a9db4b3bd34e4f68fb9abc"),
'$comment': 'test-dba'
},
u: { '$set': { odds: 0.5 } },
multi:…
1 vote -
multiple centersphere as a geometry for geowithin
im looking at one of my queries that a system regularly runs and some times we look for records that are within up to 250 different centerspheres, i wornder if we could enable, like geowithin has the ability to support multiple poligons, we could enable multiple centerspheres ,
$match: {{'location':{
"$geoWithin" : {
"$centerSphere" : [[ 14.4321, -9.4321], 2.5232135647961246e-05]
}
}}, {'location':{
"$geoWithin" : {
"$centerSphere" : [[ 14.4321, -9.4321], 2.5232135647961246e-05]
}
}}, ...}
we could do :
```
$match: {'location':{
"$geoWithin" : {
"$centerSpheres" : [
[[ 14.4321, -9.4321], 2.5232135647961246e-05] ,
[[ 14.4321, -9.4321], 2.5232135647961246e-05],
...
]} }}
1 vote -
$populate stage
Please provide a $populate stage that allows to resolve single referenced documents.
Internally it could use the combination of $lookup and $unwind:Related:
https://stackoverflow.com/questions/37793844/mongodb-how-to-resolve-dbref-on-client-side
1 vote -
Provide straightforward syntax for 1-to-1 joins in aggregation
The syntax for joins that bring back multiple documents from foreign collections is very straightforward and yields exactly what one would expect, but simple joins that are bread and butter in SQL require very convoluted and expensive to run syntax.
Consider a product database that has
products
,categories
andreviews
collections. Each product has a unique category and may have multiple reviews. Getting all reviews in an aggregation is very straightforward (top stage), but getting categories, similar to SQL, is as convoluted as it gets (bottom stage).
…db.products.aggregate( [ // // Document aggregates naturally aggregate foreign documents // into
1 vote
- Don't see your idea?