when two queries are in the same method, only the first query seems to be parsed

XMLWordPrintableJSON

    • Not Needed
    • Developer Tools

       public List<Document> queryMoviesByYear(String year) {
              Bson match = Aggregates.match(Filters.eq("year", year));
              Bson group = Aggregates.group("newField",
                  Accumulators.avg("test", "$year"),
                  Accumulators.sum("test2", "$year"),
                  Accumulators.bottom("field", Sorts.ascending("year"), "$year")
              );
              Bson project = Aggregates.project(Projections.fields(Projections.include("year", "plot")));
              Bson sort = Aggregates.sort(Sorts.orderBy(Sorts.ascending("asd", "qwe")));
      
              var r = client
                  .getDatabase("sample_mflix")
                  .getCollection("movies")
                  .aggregate(List.of(match, group, project, sort))
                  .into(new ArrayList<>());
      
              var w = client
                  .getDatabase("ggggg")
                  .getCollection("comments")
                  .aggregate(List.of())
                  .into(new ArrayList<>());
      
              return w;
          }
      

            Assignee:
            Himanshu Singh
            Reporter:
            Kevin Mas Ruiz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: