{"action":"closed","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6639","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6639/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6639/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6639/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6639","id":174175310,"number":6639,"title":"Is there problem in query vertices with labels ? ","user":{"login":"BruceMu","id":5007167,"avatar_url":"https://avatars.githubusercontent.com/u/5007167?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceMu","html_url":"https://github.com/BruceMu","followers_url":"https://api.github.com/users/BruceMu/followers","following_url":"https://api.github.com/users/BruceMu/following{/other_user}","gists_url":"https://api.github.com/users/BruceMu/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceMu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceMu/subscriptions","organizations_url":"https://api.github.com/users/BruceMu/orgs","repos_url":"https://api.github.com/users/BruceMu/repos","events_url":"https://api.github.com/users/BruceMu/events{/privacy}","received_events_url":"https://api.github.com/users/BruceMu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false},"assignees":[{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-08-31T03:19:16Z","updated_at":"2016-09-22T06:04:15Z","closed_at":"2016-09-22T06:04:15Z","body":"## OrientDB Version, operating system, or hardware.\r\n## Operating System\r\n- [ ] Linux\r\n- [x] MacOSX\r\n- [ ] Windows\r\n- [ ] Other Unix\r\n- [ ] Other, name? \r\n\r\nOrientDB version is 2.2.8\r\n\r\nI insert 15 vertices with type 'PERSON', the value of property age is range from 0 to 3;\r\nAt first ,I don't use label,and it querys as \"select from V where age = 0\", and return 3 result : \r\n>\r\nv(PERSON)[#19:0]\r\nv(PERSON)[#19:5]\r\nv(PERSON)[#19:10]\r\n\r\nAnd then,I add label to the query, so it looks like \"select from PERSON where age = 0\",but only result 1 result : \r\n>\r\nv(PERSON)[#19:10]\r\n\r\nwhat's the problem ?  code is :\r\n```java \r\n        GraphQuery query = getOrientGraph().query();\r\n        for (Map.Entry<String, Object> entry : properties.entrySet()) {\r\n            query = query.has(\"age\", 0);\r\n        }\r\n\r\n        Iterable<com.tinkerpop.blueprints.Vertex> it = query.vertices();\r\n        for (com.tinkerpop.blueprints.Vertex vertex : it) {\r\n            System.out.println(vertex.toString());// three results ;\r\n        }\r\n\r\n        ((OrientGraphQuery)query).labels(\"PERSON\");\r\n\r\n        Iterable<com.tinkerpop.blueprints.Vertex> it2 = query.vertices();\r\n        for (com.tinkerpop.blueprints.Vertex vertex : it2) {\r\n            System.out.println(vertex.toString());// only one result ! why ???\r\n        }\r\n\r\n```\r\n"}}
{"actor":{"display_login":"BruceMu"}}