{"action":"created","issue":{"url":"https://api.github.com/repos/marklogic/node-client-api/issues/274","repository_url":"https://api.github.com/repos/marklogic/node-client-api","labels_url":"https://api.github.com/repos/marklogic/node-client-api/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/marklogic/node-client-api/issues/274/comments","events_url":"https://api.github.com/repos/marklogic/node-client-api/issues/274/events","html_url":"https://github.com/marklogic/node-client-api/issues/274","id":170696654,"number":274,"title":"There is no representation of cts:linestring() on Node.js Client API","user":{"login":"ayuwono","id":7096668,"avatar_url":"https://avatars.githubusercontent.com/u/7096668?v=3","gravatar_id":"","url":"https://api.github.com/users/ayuwono","html_url":"https://github.com/ayuwono","followers_url":"https://api.github.com/users/ayuwono/followers","following_url":"https://api.github.com/users/ayuwono/following{/other_user}","gists_url":"https://api.github.com/users/ayuwono/gists{/gist_id}","starred_url":"https://api.github.com/users/ayuwono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayuwono/subscriptions","organizations_url":"https://api.github.com/users/ayuwono/orgs","repos_url":"https://api.github.com/users/ayuwono/repos","events_url":"https://api.github.com/users/ayuwono/events{/privacy}","received_events_url":"https://api.github.com/users/ayuwono/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marklogic/node-client-api/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/marklogic/node-client-api/labels/major","name":"major","color":"fbca04"},{"url":"https://api.github.com/repos/marklogic/node-client-api/labels/new","name":"new","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"wooldridge","id":477757,"avatar_url":"https://avatars.githubusercontent.com/u/477757?v=3","gravatar_id":"","url":"https://api.github.com/users/wooldridge","html_url":"https://github.com/wooldridge","followers_url":"https://api.github.com/users/wooldridge/followers","following_url":"https://api.github.com/users/wooldridge/following{/other_user}","gists_url":"https://api.github.com/users/wooldridge/gists{/gist_id}","starred_url":"https://api.github.com/users/wooldridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wooldridge/subscriptions","organizations_url":"https://api.github.com/users/wooldridge/orgs","repos_url":"https://api.github.com/users/wooldridge/repos","events_url":"https://api.github.com/users/wooldridge/events{/privacy}","received_events_url":"https://api.github.com/users/wooldridge/received_events","type":"User","site_admin":false},"assignees":[{"login":"wooldridge","id":477757,"avatar_url":"https://avatars.githubusercontent.com/u/477757?v=3","gravatar_id":"","url":"https://api.github.com/users/wooldridge","html_url":"https://github.com/wooldridge","followers_url":"https://api.github.com/users/wooldridge/followers","following_url":"https://api.github.com/users/wooldridge/following{/other_user}","gists_url":"https://api.github.com/users/wooldridge/gists{/gist_id}","starred_url":"https://api.github.com/users/wooldridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wooldridge/subscriptions","organizations_url":"https://api.github.com/users/wooldridge/orgs","repos_url":"https://api.github.com/users/wooldridge/repos","events_url":"https://api.github.com/users/wooldridge/events{/privacy}","received_events_url":"https://api.github.com/users/wooldridge/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/marklogic/node-client-api/milestones/9","html_url":"https://github.com/marklogic/node-client-api/milestones/9.0-ea3","labels_url":"https://api.github.com/repos/marklogic/node-client-api/milestones/9/labels","id":1559562,"number":9,"title":"9.0-ea3","description":" Fixes targeted for the 9.0 EA3 release ","creator":{"login":"nwalsh-ml","id":8441564,"avatar_url":"https://avatars.githubusercontent.com/u/8441564?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalsh-ml","html_url":"https://github.com/nwalsh-ml","followers_url":"https://api.github.com/users/nwalsh-ml/followers","following_url":"https://api.github.com/users/nwalsh-ml/following{/other_user}","gists_url":"https://api.github.com/users/nwalsh-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalsh-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalsh-ml/subscriptions","organizations_url":"https://api.github.com/users/nwalsh-ml/orgs","repos_url":"https://api.github.com/users/nwalsh-ml/repos","events_url":"https://api.github.com/users/nwalsh-ml/events{/privacy}","received_events_url":"https://api.github.com/users/nwalsh-ml/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":2,"state":"open","created_at":"2016-02-02T21:04:16Z","updated_at":"2016-08-11T23:47:37Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-08-11T17:08:40Z","updated_at":"2016-08-12T15:47:17Z","closed_at":null,"body":"There is no representation of cts:linestring() on Node.js Client API\r\n\r\nOn xquery, we can do something like:\r\n\r\n```\r\n   xquery version \"1.0-ml\";\r\n\r\n   let $point-index := cts:geospatial-region-path-reference(\"/root/item/point\",(\"coordinate-system=wgs84\"))\r\n   let $linestring := cts:linestring((cts:point(-1,-50.9877),cts:point(83.229523,-34.453123), cts:point(-1,-54.6798)))\r\n   let $docs :=  cts:search(fn:doc(), cts:geospatial-region-query( $point-index, \"intersects\", $linestring))\r\n   return $docs\r\n```\r\n\r\nTried q.linestring() or q.lineString() but both are not recognized as functions\r\n\r\n```\r\n    dbWriter.documents.query(\r\n      q.where(\r\n        q.geospatialRegion(\r\n          q.geoPath('/root/item/box'),\r\n          'contains',\r\n          q.linestring([q.point(-5, -70), q.point(4, -70), q.point(3, -60), q.point(-3, -65), q.point(-5, -70)])\r\n        )\r\n      )\r\n    )\r\n```"},"comment":{"url":"https://api.github.com/repos/marklogic/node-client-api/issues/comments/239482852","html_url":"https://github.com/marklogic/node-client-api/issues/274#issuecomment-239482852","issue_url":"https://api.github.com/repos/marklogic/node-client-api/issues/274","id":239482852,"user":{"login":"ehennum","id":1170070,"avatar_url":"https://avatars.githubusercontent.com/u/1170070?v=3","gravatar_id":"","url":"https://api.github.com/users/ehennum","html_url":"https://github.com/ehennum","followers_url":"https://api.github.com/users/ehennum/followers","following_url":"https://api.github.com/users/ehennum/following{/other_user}","gists_url":"https://api.github.com/users/ehennum/gists{/gist_id}","starred_url":"https://api.github.com/users/ehennum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehennum/subscriptions","organizations_url":"https://api.github.com/users/ehennum/orgs","repos_url":"https://api.github.com/users/ehennum/repos","events_url":"https://api.github.com/users/ehennum/events{/privacy}","received_events_url":"https://api.github.com/users/ehennum/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T15:47:17Z","updated_at":"2016-08-12T15:47:17Z","body":"I can confirm the Search API doesn't support cts:line-string or cts:complex-polygon.\r\n\r\nSo, the Node.js API can't support them.\r\n"}}
{"actor":{"display_login":"ehennum"}}