Skip to content

Commit

Permalink
Merge pull request #249 from bmeg/mongo/allowDiskUse
Browse files Browse the repository at this point in the history
Mongo - AllowDiskUse
  • Loading branch information
kellrott authored Mar 26, 2021
2 parents 409dee5 + 65563ab commit ce6a84f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mongo/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)

// Processor stores the information for a mongo aggregation pipeline
Expand Down Expand Up @@ -56,7 +57,8 @@ func (proc *Processor) Process(ctx context.Context, man gdbi.Manager, in gdbi.In
for t := range in {
nResults := 0
//plog.Infof("Running: %#v", proc.query)
cursor, err := initCol.Aggregate(ctx, proc.query)
trueVal := true
cursor, err := initCol.Aggregate(ctx, proc.query, &options.AggregateOptions{AllowDiskUse: &trueVal})
if err != nil {
plog.Errorf("Query Error (%s) : %s", proc.query, err)
continue
Expand Down

0 comments on commit ce6a84f

Please sign in to comment.