All Questions
Tagged with mongodb-query meteor
205
questions
1
vote
1
answer
55
views
How to ensure Meteor publication is reactive to arguments
Why doesn't the users publication publish new data when its entities argument changes?
Client code
const subReady = useTracker(() => {
return Meteor.subscribe('users', selectedEntities).ready();
}...
0
votes
1
answer
82
views
I Am new to MongoDB and have following query which needs to be queried over 50k data from a collection but it is taking more time to return data
Sample document:
{
"_id": "gJtkx4nKAdWphanzZ",
"newsId": "1212",
"newsTitle": "ab",
"newsLink": "link",...
0
votes
1
answer
89
views
Exception while simulating the effect of invoking '' When the validation object contains mongo operators, you must set the modifier option to true
There is another question about the same issue, but I really couldn’t get it.
https://forums.meteor.com/t/how-to-fix-error-exception-while-invoking-method-actionfail-error-when-the-validation-object-...
0
votes
1
answer
39
views
I want to query on-going meeting between the duration defined in collection based on occurrence time
Facing issue to on-going meeting when meeting started it should show meeting until duration present in collection.
This is collection of meeting with occurence time of meeting
{
"status&...
0
votes
1
answer
749
views
How to return an aggregate query in an Apollo resolver (Meteor/Apollo/Graphql)?
I'm trying to run a query with an aggregate in Meteor and I've not been able to figure out how to return an aggregation query.
In my GraphQL schema:
type UserRelation {
date: String!
userID: ...
2
votes
1
answer
481
views
Can I generate unique String _ids in aggregation pipeline
I am planning on transforming a large data set from my mongo database and creating a new collection from the transformed documents. I wanted to do this as part of a single aggregation to stop round ...
-1
votes
1
answer
64
views
MongoDB - How to group by two fields & sum values of a field?
I have array json like this & how to group on itemId and different date :
let data=[
{itemId:'001', tranDate:'2020/03/15', qty:10},
{itemId:'001', tranDate:'2020/03/15', qty:...
0
votes
1
answer
194
views
Meteor Mongo aggregate returns BSON type
I have the below aggregate query
var pipeline=[ { $match: { Active:1, Duration:'monthly' } },{ $sample: { size: 3 } }]
Products.aggregate(pipeline).toArray((err, result) => {
subscription.added('...
2
votes
1
answer
96
views
Sorting a meteor pointer based on a record's nested field that may not exist
I have this collection, the objects in them look like:
{
name: 'Apple',
listOrder: {
default: 1,
wallmart: 1
}
color: 'Red'
},
{
name: 'Orange',
listOrder: {
default: 2,
...
0
votes
1
answer
123
views
Sort with multiple keys meteor mongodb
I've collection named invoice, I wanted to sort my collection by date but result should be invoices having invoice number should be at top and invoice without having invoice number should be at the ...
0
votes
1
answer
62
views
Elastic Easy Search Please provide an index for your component [no-index]?
Despite carefully following the instructions on how to configure the Elastic Search Package to add Search functionality to my Meteor App, I keep getting this frustrating error message in my browser ...
0
votes
1
answer
43
views
Why isn't my $sort Operator on dates function consistent in my query?
I am trying to write a query to sort out documents based on descending dates ...{sort: {paymentDate: -1 }} order. The first time the query runs, the query section {sort: {paymentDate: -1 }} seems get ...
2
votes
1
answer
85
views
How do I filter a mongo collection on nested field value?
I have a meteor collection with the below structure. This actually comes from a Meteor-files collection by ostrio.
{
"_id" : "HsXoZ6bxkx5kMcJtm",
"name" : "trees.jpg",
"meta" : { "artist_id" : "...
0
votes
1
answer
70
views
How do I use the $and Logical Query Operator to apply to all three Query clauses?
Though I am using the $and Logical Query Operator to join several query clauses, the $and logical query operator seems to IGNORE one of the query clauses. Can someone kindly explain where I am going ...
1
vote
1
answer
34
views
What "Logical Query Operator/s" should I use to merge two separate queries?
What Logical Query Operator/s do I use to join TWO queries yielding documents that belong to the logged in user Meteor.userId(); AND all documents that have the logged in user's phone number in the ...