File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
google-cloud-firestore/src/main/java/com/google/cloud/firestore Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -504,17 +504,7 @@ public Pipeline findNearest(
504
504
FindNearest .DistanceMeasure distanceMeasure ,
505
505
FindNearestOptions options ) {
506
506
// Implementation for findNearest (add the FindNearest stage if needed)
507
- return new Pipeline (
508
- this .db ,
509
- ImmutableList .<Stage >builder ()
510
- .addAll (stages )
511
- .add (
512
- new FindNearest (
513
- property ,
514
- vector ,
515
- distanceMeasure ,
516
- options )) // Assuming FindNearest takes these arguments
517
- .build ());
507
+ return append (new FindNearest (property , vector , distanceMeasure , options ));
518
508
}
519
509
520
510
/**
@@ -542,8 +532,7 @@ public Pipeline findNearest(
542
532
*/
543
533
@ BetaApi
544
534
public Pipeline sort (Ordering ... orders ) {
545
- return new Pipeline (
546
- this .db , ImmutableList .<Stage >builder ().addAll (stages ).add (new Sort (orders )).build ());
535
+ return append (new Sort (orders ));
547
536
}
548
537
549
538
/**
@@ -774,7 +763,7 @@ public void onComplete() {
774
763
.addAnnotation (
775
764
"Firestore.ExecutePipeline: Completed" ,
776
765
ImmutableMap .of (
777
- "numDocuments" , AttributeValue .longAttributeValue (( long ) totalNumDocuments )));
766
+ "numDocuments" , AttributeValue .longAttributeValue (numDocuments )));
778
767
resultObserver .onCompleted (executionTime );
779
768
}
780
769
};
You can’t perform that action at this time.
0 commit comments