You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "Michael Russo (JIRA)" <ji...@apache.org> on 2015/11/04 00:10:28 UTC

[jira] [Comment Edited] (USERGRID-27) Limit on connection query not working

    [ https://issues.apache.org/jira/browse/USERGRID-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988356#comment-14988356 ] 

Michael Russo edited comment on USERGRID-27 at 11/3/15 11:10 PM:
-----------------------------------------------------------------

This is fixed in 2.1.  Here is pulling back all connections:

{code}
➜  ~  curl "http://localhost:8080/test-organization/test-app/books/book1/connecting/has"
{
  "action" : "get",
  "application" : "972033e9-8276-11e5-a427-36d323f2ba24",
  "params" : { },
  "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting",
  "uri" : "http://localhost:8080/test-organization/test-app/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting",
  "entities" : [ {
    "uuid" : "bc6f5b41-827f-11e5-9896-36d323f2ba24",
    "type" : "library",
    "name" : "library4",
    "created" : 1446592083854,
    "modified" : 1446592083854,
    "metadata" : {
      "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/bc6f5b41-827f-11e5-9896-36d323f2ba24",
      "size" : 321,
      "connections" : {
        "has" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/bc6f5b41-827f-11e5-9896-36d323f2ba24/has"
      }
    }
  }, {
    "uuid" : "baf00df8-827f-11e5-9896-36d323f2ba24",
    "type" : "library",
    "name" : "library3",
    "created" : 1446592081342,
    "modified" : 1446592081342,
    "metadata" : {
      "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/baf00df8-827f-11e5-9896-36d323f2ba24",
      "size" : 321,
      "connections" : {
        "has" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/baf00df8-827f-11e5-9896-36d323f2ba24/has"
      }
    }
  }, {
    "uuid" : "b98bc3b5-827f-11e5-9896-36d323f2ba24",
    "type" : "library",
    "name" : "library2",
    "created" : 1446592079007,
    "modified" : 1446592079007,
    "metadata" : {
      "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/b98bc3b5-827f-11e5-9896-36d323f2ba24",
      "size" : 321,
      "connections" : {
        "has" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/b98bc3b5-827f-11e5-9896-36d323f2ba24/has"
      }
    }
  }, {
    "uuid" : "eb88ba91-827c-11e5-9896-36d323f2ba24",
    "type" : "library",
    "name" : "library1",
    "created" : 1446590874383,
    "modified" : 1446590874383,
    "metadata" : {
      "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/eb88ba91-827c-11e5-9896-36d323f2ba24",
      "size" : 321,
      "connections" : {
        "has" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/eb88ba91-827c-11e5-9896-36d323f2ba24/has"
      }
    }
  } ],
  "timestamp" : 1446592170947,
  "duration" : 12,
  "organization" : "test-organization",
  "applicationName" : "test-app"
}
{code}

Here is pulling back connections using a limit:

{code}
➜  ~  curl "http://localhost:8080/test-organization/test-app/books/book1/connecting/has?limit=2"
{
  "action" : "get",
  "application" : "972033e9-8276-11e5-a427-36d323f2ba24",
  "params" : {
    "limit" : [ "2" ]
  },
  "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting",
  "uri" : "http://localhost:8080/test-organization/test-app/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting",
  "entities" : [ {
    "uuid" : "bc6f5b41-827f-11e5-9896-36d323f2ba24",
    "type" : "library",
    "name" : "library4",
    "created" : 1446592083854,
    "modified" : 1446592083854,
    "metadata" : {
      "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/bc6f5b41-827f-11e5-9896-36d323f2ba24",
      "size" : 321,
      "connections" : {
        "has" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/bc6f5b41-827f-11e5-9896-36d323f2ba24/has"
      }
    }
  }, {
    "uuid" : "baf00df8-827f-11e5-9896-36d323f2ba24",
    "type" : "library",
    "name" : "library3",
    "created" : 1446592081342,
    "modified" : 1446592081342,
    "metadata" : {
      "path" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/baf00df8-827f-11e5-9896-36d323f2ba24",
      "size" : 321,
      "connections" : {
        "has" : "/books/f424b588-827c-11e5-9896-36d323f2ba24/connecting/baf00df8-827f-11e5-9896-36d323f2ba24/has"
      }
    }
  } ],
  "timestamp" : 1446592112416,
  "duration" : 12,
  "organization" : "test-organization",
  "applicationName" : "test-app"
}
{code}


was (Author: mrusso):
This is fixed in 2.1.  Here is pulling back all connections:

{code}
➜  ~  curl "http://localhost:8080/test-organization/test-app/library/library1/has"
{
  "action" : "get",
  "application" : "972033e9-8276-11e5-a427-36d323f2ba24",
  "params" : { },
  "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has",
  "uri" : "http://localhost:8080/test-organization/test-app/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has",
  "entities" : [ {
    "uuid" : "0eb90f46-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book14",
    "created" : 1446590933420,
    "modified" : 1446590933420,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0eb90f46-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0eb90f46-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "0d46ba4a-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book13",
    "created" : 1446590930993,
    "modified" : 1446590930993,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0d46ba4a-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0d46ba4a-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "0b63ca23-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book12",
    "created" : 1446590927828,
    "modified" : 1446590927828,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0b63ca23-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0b63ca23-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "09f56cc3-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book11",
    "created" : 1446590925427,
    "modified" : 1446590925427,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/09f56cc3-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/09f56cc3-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "0856b090-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book10",
    "created" : 1446590922709,
    "modified" : 1446590922709,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0856b090-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0856b090-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "05228850-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book9",
    "created" : 1446590917334,
    "modified" : 1446590917334,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/05228850-827d-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/05228850-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "03b0cf89-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book8",
    "created" : 1446590914911,
    "modified" : 1446590914911,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/03b0cf89-827d-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/03b0cf89-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "01f7114d-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book7",
    "created" : 1446590912016,
    "modified" : 1446590912016,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/01f7114d-827d-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/01f7114d-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "fff9e266-827c-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book6",
    "created" : 1446590908679,
    "modified" : 1446590908679,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/fff9e266-827c-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/fff9e266-827c-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "fdee3396-827c-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book5",
    "created" : 1446590905247,
    "modified" : 1446590905247,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/fdee3396-827c-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/fdee3396-827c-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "fc53bd22-827c-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book4",
    "created" : 1446590902557,
    "modified" : 1446590902557,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/fc53bd22-827c-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/fc53bd22-827c-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "faae2322-827c-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book3",
    "created" : 1446590899794,
    "modified" : 1446590899794,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/faae2322-827c-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/faae2322-827c-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "f90778af-827c-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book2",
    "created" : 1446590897024,
    "modified" : 1446590897024,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/f90778af-827c-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/f90778af-827c-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "f424b588-827c-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book1",
    "created" : 1446590888827,
    "modified" : 1446590888827,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/f424b588-827c-11e5-9896-36d323f2ba24",
      "size" : 312,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/f424b588-827c-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  } ],
  "timestamp" : 1446591082639,
  "duration" : 20,
  "organization" : "test-organization",
  "applicationName" : "test-app"
}
{code}

Here is pulling back connections using a limit:

{code}
➜  ~  curl "http://localhost:8080/test-organization/test-app/library/library1/has?limit=2"
{
  "action" : "get",
  "application" : "972033e9-8276-11e5-a427-36d323f2ba24",
  "params" : {
    "limit" : [ "2" ]
  },
  "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has",
  "uri" : "http://localhost:8080/test-organization/test-app/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has",
  "entities" : [ {
    "uuid" : "0eb90f46-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book14",
    "created" : 1446590933420,
    "modified" : 1446590933420,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0eb90f46-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0eb90f46-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  }, {
    "uuid" : "0d46ba4a-827d-11e5-9896-36d323f2ba24",
    "type" : "book",
    "name" : "book13",
    "created" : 1446590930993,
    "modified" : 1446590930993,
    "metadata" : {
      "path" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0d46ba4a-827d-11e5-9896-36d323f2ba24",
      "size" : 313,
      "connecting" : {
        "has" : "/libraries/eb88ba91-827c-11e5-9896-36d323f2ba24/has/0d46ba4a-827d-11e5-9896-36d323f2ba24/connecting/has"
      }
    }
  } ],
  "timestamp" : 1446591155596,
  "duration" : 12,
  "organization" : "test-organization",
  "applicationName" : "test-app",
  "cursor" : "OikKAfqAM_qDdXVpZGMwZDQ2YmE0YS04MjdkLTExZTUtOTg5Ni0zNmQzMjNmMmJhMjSDdHlwZUNib29r-4Ax-olzb3VyY2VOb2Rl-kFjZWI4OGJhOTEtODI3Yy0xMWU1LTk4OTYtMzZkMzIzZjJiYTI0QkZsaWJyYXJ5-0JNenp6Y29ubnp6enxoYXOJdGFyZ2V0Tm9kZfpBYzBlYjkwZjQ2LTgyN2QtMTFlNS05ODk2LTM2ZDMyM2YyYmEyNEJDYm9va_uIdGltZXN0YW1wJQdLAj5MAmJSqvv7"
}
{code}

> Limit on connection query not working
> -------------------------------------
>
>                 Key: USERGRID-27
>                 URL: https://issues.apache.org/jira/browse/USERGRID-27
>             Project: Usergrid
>          Issue Type: Bug
>          Components: Stack
>            Reporter: Rod Simpson
>            Assignee: Michael Russo
>            Priority: Blocker
>
> Also "limit" doesn't seems to be working for connections for e.g. https://api.usergrid.com/fdsafdsa/test/users/me/connecting/shares?limit=2&access_token=YWMtSQ92bBCsEeOYAQ1TRlcn_AAAAUDuPjgtlh06pENBKFRmoxta8jg1XwRuwVs. Returns all in our case is 3



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)