{"action":"created","issue":{"url":"https://api.github.com/repos/arangodb/arangodb/issues/5640","repository_url":"https://api.github.com/repos/arangodb/arangodb","labels_url":"https://api.github.com/repos/arangodb/arangodb/issues/5640/labels{/name}","comments_url":"https://api.github.com/repos/arangodb/arangodb/issues/5640/comments","events_url":"https://api.github.com/repos/arangodb/arangodb/issues/5640/events","html_url":"https://github.com/arangodb/arangodb/issues/5640","id":334043147,"node_id":"MDU6SXNzdWUzMzQwNDMxNDc=","number":5640,"title":"CONTAINS(\"test\", \"\") == false","user":{"login":"Yogu","id":395810,"node_id":"MDQ6VXNlcjM5NTgxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/395810?v=4","gravatar_id":"","url":"https://api.github.com/users/Yogu","html_url":"https://github.com/Yogu","followers_url":"https://api.github.com/users/Yogu/followers","following_url":"https://api.github.com/users/Yogu/following{/other_user}","gists_url":"https://api.github.com/users/Yogu/gists{/gist_id}","starred_url":"https://api.github.com/users/Yogu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yogu/subscriptions","organizations_url":"https://api.github.com/users/Yogu/orgs","repos_url":"https://api.github.com/users/Yogu/repos","events_url":"https://api.github.com/users/Yogu/events{/privacy}","received_events_url":"https://api.github.com/users/Yogu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-20T11:52:54Z","updated_at":"2018-06-20T12:20:06Z","closed_at":null,"author_association":"NONE","body":"## my environment running ArangoDB\r\nI'm using the latest ArangoDB of the respective release series:\r\n- [x] 3.3\r\n\r\nMode:\r\n- [x] Single-Server\r\n\r\nStorage-Engine:\r\n- [x] mmfiles\r\n\r\nOn this operating system:\r\n- [x] Windows, version: 10\r\n\r\n\r\n### this is an AQL-related issue:\r\n[ ] I'm using graph features\r\n\r\nI'm issuing AQL via:\r\n- [x] web interface with this browser:     running on this OS:\r\n\r\nI've run `db._explain(\"<my aql query>\")` and it didn't shed more light on this.\r\nThe AQL query in question is:\r\n\r\n    RETURN CONTAINS(test\", \"\")\r\n\r\nIt returns `false`, but all languages I am aware of return `true` for a equivalent call."},"comment":{"url":"https://api.github.com/repos/arangodb/arangodb/issues/comments/398729063","html_url":"https://github.com/arangodb/arangodb/issues/5640#issuecomment-398729063","issue_url":"https://api.github.com/repos/arangodb/arangodb/issues/5640","id":398729063,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODcyOTA2Mw==","user":{"login":"Simran-B","id":7819991,"node_id":"MDQ6VXNlcjc4MTk5OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/7819991?v=4","gravatar_id":"","url":"https://api.github.com/users/Simran-B","html_url":"https://github.com/Simran-B","followers_url":"https://api.github.com/users/Simran-B/followers","following_url":"https://api.github.com/users/Simran-B/following{/other_user}","gists_url":"https://api.github.com/users/Simran-B/gists{/gist_id}","starred_url":"https://api.github.com/users/Simran-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simran-B/subscriptions","organizations_url":"https://api.github.com/users/Simran-B/orgs","repos_url":"https://api.github.com/users/Simran-B/repos","events_url":"https://api.github.com/users/Simran-B/events{/privacy}","received_events_url":"https://api.github.com/users/Simran-B/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T12:20:05Z","updated_at":"2018-06-20T12:20:05Z","author_association":"CONTRIBUTOR","body":"Shouldn't a function/method/operator be used that resembles a \"contains\" test (if available) rather than one that returns the position in the string if we compare it to AQL's `CONTAINS()` with returnIndex = false?\r\n\r\nModern JavaScript:\r\n\r\n```\r\n\"test\".includes(\"\")\r\ntrue\r\n\"test\".includes(\"x\")\r\nfalse\r\n\r\n\r\n// Bonus:\r\n\"test\".includes()\r\nfalse\r\n\"test\".includes(null)\r\nfalse\r\n```\r\n\r\nPython 2/3:\r\n\r\n```\r\n>>> \"\" in \"test\"\r\nTrue\r\n>>> \"x\" in \"test\"\r\nFalse\r\n```"}}
{"actor":{"display_login":"Simran-B"}}