Closed Sptandi closed 2 years ago
Can you try adding unwind:$track to the pipeline.
same problem here it acts like query = {}
Same here please solve this problem
remove await in trade aggregate
> const trayekAggregate = Trayek.aggregate([
> {
> $match: {
> $or: [
> {
> 'track.destination.destinationName': {
> $regex: `${req.query.placeName}`,
> $options: 'i',
> },
> },
> {
> 'track.destination.destinationAddress': {
> $regex: `${req.query.placeName}`,
> $options: 'i',
> },
> },
> ],
> },
> },
> {
> $project: {
> destination: '$track.destination.destinationName',
> destinationAddress: '$track.destination.destinationAddress',
> },
> },
> ]);
Please reopen if the issue exists.
Hello, I make query using aggregate to filter by value in nested document like code show below :
Without paginete the result is something like this :
After use paginate, it's displaying all the data in the collection :
Without paginate it's working, but after using paginate it's display all the data. Any help ?