XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • 1.0.0
    • library
    • Security Level: Public
    • None

    Description

      I'm creating this ticket on behalf of a user who is not able to login here.

      He's able to create and load a view from the UI like so:

      View name is „_design/statistics/_view/class_malware“

      Map is:
      function (doc, meta) {

      if (doc.malware == null)

      { emit("buggy",1) }

      else if (doc.malware == true)

      { emit("malware",1); }

      else

      { emit("clean",1); }

      }

      Reduce ist:
      _count

      Via the URL (/<bucket>/_design/statistics/_view/class_malware?stale=update_after&connection_timeout=60000&limit=10&skip=0&group_level=1) I’ll get the correct result:

      {"rows":[

      {"key":"clean","value":1}

      ,

      {"key":"malware","value":95}

      ]
      }

      Now, when he uses it from the python sdk like this:

      print self.__CB.conn.query('/statistics', 'class_malware')
      or
      print self.__CB.conn.query('statistics', 'class_malware', group_level=1, reduce=True)

      He always gets

      View<Design=statistics, View=class_malware, Query=Query:'', Rows Fetched=0>

      .. when reduce is disabled, also no rows fetched.

      If its wrong usage, or incomplete information let me know and I'll work it through with him.Thanks!

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            daschl Michael Nitschinger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty