MapReduce fails with options SetQuery, SetSortOrder

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The attached Program.cs fails with the message:

      Message=Command 'mapreduce' failed: db assertion failure (response: { "assertion" : "could not create cursor over test.test for query : { B:

      { $exists: true }

      } sort :

      { B: 1 }

      ", "assertionCode" : 15876, "errmsg" : "db assertion failure", "ok" : 0.0 })

      The code is based on the official test TestMapReduceInlineWithQuery. Perhaps
      the problem can be seen just there if the line

      var result = _collection.MapReduce(query, map, reduce);

      is replaced with

      var options = new MapReduceOptionsBuilder();
      options.SetQuery(query);
      options.SetOutput(MapReduceOutput.Inline);
      options.SetSortOrder((new SortByBuilder()).Ascending("B"));
      var result = _collection.MapReduce(map, reduce, options);

      If I remove the line with SetSortOrder then the code works fine.

      Sorry if I just do something wrong and this is a false alarm. I asked the
      question at the forum but did not get the answer.

            Assignee:
            Robert Stam
            Reporter:
            Roman Kuzmin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: