{"action":"created","comment":{"url":"https://api.github.com/repos/att/rcloud/pulls/comments/42880349","id":42880349,"diff_hunk":"@@ -401,117 +433,125 @@ rcloud.search <-function(query, all_sources, sortby, orderby, start, pagesize) {\n   url <- getConf(\"solr.url\")\n   if (is.null(url)) stop(\"solr is not enabled\")\n   ## FIXME: shouldn't we URL-encode the query?!?\n-  q <- gsub(\"%20\",\"+\",query)\n-  solr.query <- paste0(\"/select?q=\",q,\"&start=\",start,\"&rows=\",pagesize,\"&wt=json&indent=true&fl=description,id,user,updated_at,starcount&hl=true&hl.preserveMulti=true&hl.fl=content,comments&hl.fragsize=0&hl.maxAnalyzedChars=-1&sort=\",sortby,\"+\",orderby)\n-\n-  query <- function(solr.url,source='') {\n-  solr.url <- paste0(solr.url, solr.query)\n-  solr.res <- getURL(solr.url, .encoding = 'utf-8', .mapUnicode=FALSE)\n-  solr.res <- fromJSON(solr.res)\n-  response.docs <- solr.res$response$docs\n-  count <- solr.res$response$numFound\n-  rows <- solr.res$params$rows\n-  response.high <- solr.res$highlighting\n-  if(is.null(solr.res$error)) {\n-    if(length(response.docs) > 0) {\n-      for(i in 1:length(response.high)) {\n-      if(length(response.high[[i]]) != 0) {\n-\t    if(!is.null(response.high[[i]]$content)) {\n-          parts.content <- fromJSON(response.high[[i]]$content)\n-          for(j in 1:length(parts.content)) {\n-            splitted <-strsplit(parts.content[[j]]$content,'\\n')[[1]]\n-            res <-list()\n-            for(k in 1: length(splitted)) {\n-              is_match <- grep(\"open_b_close\",splitted[[k]])\n-              is_match_next <- NULL\n-              is_match_next2 <- NULL\n-              if(k < length(splitted)){\n-                is_match_next <- grep(\"open_b_close\",splitted[[k+1]])\n-              }\n-              if(k < (length(splitted) -2)){\n-                is_match_next2 <- grep(\"open_b_close\",splitted[[k+2]])\n-              }\n-              if(as.logical(length(is_match))) {\n-                if(!as.logical(length(is_match_next)) && !as.logical(length(is_match_next2)) ) {\n-                  if(as.logical(length(splitted[k-1]) == \"\") | k ==1) {\n-                    res[k] <- stitch.search.result(splitted,'optB',k)\n-                  } else {\n-                    if(as.logical(length(splitted[k-1]) != \"\")) {\n-                      res[k] <- stitch.search.result(splitted,'optC',k)\n+  solr.query <- paste0(\"q=\",query,\"&start=\",start,\"&rows=\",pagesize,\"&wt=json&indent=true&fl=description,id,user,updated_at,starcount&hl=true&hl.preserveMulti=true&hl.fl=content,comments&hl.fragsize=0&hl.maxAnalyzedChars=-1&sort=\",sortby,\"+\",orderby)\n+  query <- function(solr.url,source='',solr.authkey=NA) {","path":"rcloud.support/R/rcloud.support.R","position":124,"original_position":124,"commit_id":"ba1c96028e24318d92d8e1b2351ec4306dad80bf","original_commit_id":"ba1c96028e24318d92d8e1b2351ec4306dad80bf","user":{"login":"prateek05","id":5138222,"avatar_url":"https://avatars.githubusercontent.com/u/5138222?v=3","gravatar_id":"","url":"https://api.github.com/users/prateek05","html_url":"https://github.com/prateek05","followers_url":"https://api.github.com/users/prateek05/followers","following_url":"https://api.github.com/users/prateek05/following{/other_user}","gists_url":"https://api.github.com/users/prateek05/gists{/gist_id}","starred_url":"https://api.github.com/users/prateek05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateek05/subscriptions","organizations_url":"https://api.github.com/users/prateek05/orgs","repos_url":"https://api.github.com/users/prateek05/repos","events_url":"https://api.github.com/users/prateek05/events{/privacy}","received_events_url":"https://api.github.com/users/prateek05/received_events","type":"User","site_admin":false},"body":"query for remote solr to accept solr.authkey if the remote configs have them","created_at":"2015-10-23T15:44:28Z","updated_at":"2015-10-23T15:44:28Z","html_url":"https://github.com/att/rcloud/pull/1726#discussion_r42880349","pull_request_url":"https://api.github.com/repos/att/rcloud/pulls/1726","_links":{"self":{"href":"https://api.github.com/repos/att/rcloud/pulls/comments/42880349"},"html":{"href":"https://github.com/att/rcloud/pull/1726#discussion_r42880349"},"pull_request":{"href":"https://api.github.com/repos/att/rcloud/pulls/1726"}}},"pull_request":{"url":"https://api.github.com/repos/att/rcloud/pulls/1726","id":48523017,"html_url":"https://github.com/att/rcloud/pull/1726","diff_url":"https://github.com/att/rcloud/pull/1726.diff","patch_url":"https://github.com/att/rcloud/pull/1726.patch","issue_url":"https://api.github.com/repos/att/rcloud/issues/1726","number":1726,"state":"open","locked":false,"title":"Hotfix/1.5.1","user":{"login":"prateek05","id":5138222,"avatar_url":"https://avatars.githubusercontent.com/u/5138222?v=3","gravatar_id":"","url":"https://api.github.com/users/prateek05","html_url":"https://github.com/prateek05","followers_url":"https://api.github.com/users/prateek05/followers","following_url":"https://api.github.com/users/prateek05/following{/other_user}","gists_url":"https://api.github.com/users/prateek05/gists{/gist_id}","starred_url":"https://api.github.com/users/prateek05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateek05/subscriptions","organizations_url":"https://api.github.com/users/prateek05/orgs","repos_url":"https://api.github.com/users/prateek05/repos","events_url":"https://api.github.com/users/prateek05/events{/privacy}","received_events_url":"https://api.github.com/users/prateek05/received_events","type":"User","site_admin":false},"body":"Notes: \r\n1) Secure select end point is at /secureselect rather than /select\r\n2) Secure Update end point is at /secure/update rather than /update\r\n\r\n3) /update/json seems to be depricated which was the end point for update.search. Atleast tests with IT Solr Clusters showed no such end point exists\r\n\r\nSecurity Tokens go in header:\r\nE.g. auth-key:merbagmefef8runrser7o445emwewn\r\n\r\nMethods affected. \r\nupdate notebooks\r\nsearch notebooks\r\nupdate comments\r\nmodify comments\r\ndelete comments\r\ncreate comments\r\nsearch comments","created_at":"2015-10-22T22:44:16Z","updated_at":"2015-10-23T15:44:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69dd649ccd94b66c7c321c76887e53157cc1a30d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/att/rcloud/pulls/1726/commits","review_comments_url":"https://api.github.com/repos/att/rcloud/pulls/1726/comments","review_comment_url":"https://api.github.com/repos/att/rcloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/att/rcloud/issues/1726/comments","statuses_url":"https://api.github.com/repos/att/rcloud/statuses/ba1c96028e24318d92d8e1b2351ec4306dad80bf","head":{"label":"prateek05:hotfix/1.5.1","ref":"hotfix/1.5.1","sha":"ba1c96028e24318d92d8e1b2351ec4306dad80bf","user":{"login":"prateek05","id":5138222,"avatar_url":"https://avatars.githubusercontent.com/u/5138222?v=3","gravatar_id":"","url":"https://api.github.com/users/prateek05","html_url":"https://github.com/prateek05","followers_url":"https://api.github.com/users/prateek05/followers","following_url":"https://api.github.com/users/prateek05/following{/other_user}","gists_url":"https://api.github.com/users/prateek05/gists{/gist_id}","starred_url":"https://api.github.com/users/prateek05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateek05/subscriptions","organizations_url":"https://api.github.com/users/prateek05/orgs","repos_url":"https://api.github.com/users/prateek05/repos","events_url":"https://api.github.com/users/prateek05/events{/privacy}","received_events_url":"https://api.github.com/users/prateek05/received_events","type":"User","site_admin":false},"repo":{"id":23630109,"name":"rcloud","full_name":"prateek05/rcloud","owner":{"login":"prateek05","id":5138222,"avatar_url":"https://avatars.githubusercontent.com/u/5138222?v=3","gravatar_id":"","url":"https://api.github.com/users/prateek05","html_url":"https://github.com/prateek05","followers_url":"https://api.github.com/users/prateek05/followers","following_url":"https://api.github.com/users/prateek05/following{/other_user}","gists_url":"https://api.github.com/users/prateek05/gists{/gist_id}","starred_url":"https://api.github.com/users/prateek05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prateek05/subscriptions","organizations_url":"https://api.github.com/users/prateek05/orgs","repos_url":"https://api.github.com/users/prateek05/repos","events_url":"https://api.github.com/users/prateek05/events{/privacy}","received_events_url":"https://api.github.com/users/prateek05/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prateek05/rcloud","description":"RCloud is an HTML5 frontend for collaboratively developing and sharing R scripts","fork":true,"url":"https://api.github.com/repos/prateek05/rcloud","forks_url":"https://api.github.com/repos/prateek05/rcloud/forks","keys_url":"https://api.github.com/repos/prateek05/rcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prateek05/rcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prateek05/rcloud/teams","hooks_url":"https://api.github.com/repos/prateek05/rcloud/hooks","issue_events_url":"https://api.github.com/repos/prateek05/rcloud/issues/events{/number}","events_url":"https://api.github.com/repos/prateek05/rcloud/events","assignees_url":"https://api.github.com/repos/prateek05/rcloud/assignees{/user}","branches_url":"https://api.github.com/repos/prateek05/rcloud/branches{/branch}","tags_url":"https://api.github.com/repos/prateek05/rcloud/tags","blobs_url":"https://api.github.com/repos/prateek05/rcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prateek05/rcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prateek05/rcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/prateek05/rcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prateek05/rcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/prateek05/rcloud/languages","stargazers_url":"https://api.github.com/repos/prateek05/rcloud/stargazers","contributors_url":"https://api.github.com/repos/prateek05/rcloud/contributors","subscribers_url":"https://api.github.com/repos/prateek05/rcloud/subscribers","subscription_url":"https://api.github.com/repos/prateek05/rcloud/subscription","commits_url":"https://api.github.com/repos/prateek05/rcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/prateek05/rcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/prateek05/rcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/prateek05/rcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/prateek05/rcloud/contents/{+path}","compare_url":"https://api.github.com/repos/prateek05/rcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prateek05/rcloud/merges","archive_url":"https://api.github.com/repos/prateek05/rcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prateek05/rcloud/downloads","issues_url":"https://api.github.com/repos/prateek05/rcloud/issues{/number}","pulls_url":"https://api.github.com/repos/prateek05/rcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/prateek05/rcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/prateek05/rcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prateek05/rcloud/labels{/name}","releases_url":"https://api.github.com/repos/prateek05/rcloud/releases{/id}","created_at":"2014-09-03T17:26:32Z","updated_at":"2015-02-15T21:46:46Z","pushed_at":"2015-10-23T15:29:09Z","git_url":"git://github.com/prateek05/rcloud.git","ssh_url":"git@github.com:prateek05/rcloud.git","clone_url":"https://github.com/prateek05/rcloud.git","svn_url":"https://github.com/prateek05/rcloud","homepage":"","size":40254,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"att:hotfix/1.5.1","ref":"hotfix/1.5.1","sha":"805526e46bbc8b2bd34370c0a63c1fe6679cf38a","user":{"login":"att","id":3477066,"avatar_url":"https://avatars.githubusercontent.com/u/3477066?v=3","gravatar_id":"","url":"https://api.github.com/users/att","html_url":"https://github.com/att","followers_url":"https://api.github.com/users/att/followers","following_url":"https://api.github.com/users/att/following{/other_user}","gists_url":"https://api.github.com/users/att/gists{/gist_id}","starred_url":"https://api.github.com/users/att/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/att/subscriptions","organizations_url":"https://api.github.com/users/att/orgs","repos_url":"https://api.github.com/users/att/repos","events_url":"https://api.github.com/users/att/events{/privacy}","received_events_url":"https://api.github.com/users/att/received_events","type":"Organization","site_admin":false},"repo":{"id":5250457,"name":"rcloud","full_name":"att/rcloud","owner":{"login":"att","id":3477066,"avatar_url":"https://avatars.githubusercontent.com/u/3477066?v=3","gravatar_id":"","url":"https://api.github.com/users/att","html_url":"https://github.com/att","followers_url":"https://api.github.com/users/att/followers","following_url":"https://api.github.com/users/att/following{/other_user}","gists_url":"https://api.github.com/users/att/gists{/gist_id}","starred_url":"https://api.github.com/users/att/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/att/subscriptions","organizations_url":"https://api.github.com/users/att/orgs","repos_url":"https://api.github.com/users/att/repos","events_url":"https://api.github.com/users/att/events{/privacy}","received_events_url":"https://api.github.com/users/att/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/att/rcloud","description":"RCloud is an HTML5 frontend for collaboratively developing and sharing R scripts","fork":false,"url":"https://api.github.com/repos/att/rcloud","forks_url":"https://api.github.com/repos/att/rcloud/forks","keys_url":"https://api.github.com/repos/att/rcloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/att/rcloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/att/rcloud/teams","hooks_url":"https://api.github.com/repos/att/rcloud/hooks","issue_events_url":"https://api.github.com/repos/att/rcloud/issues/events{/number}","events_url":"https://api.github.com/repos/att/rcloud/events","assignees_url":"https://api.github.com/repos/att/rcloud/assignees{/user}","branches_url":"https://api.github.com/repos/att/rcloud/branches{/branch}","tags_url":"https://api.github.com/repos/att/rcloud/tags","blobs_url":"https://api.github.com/repos/att/rcloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/att/rcloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/att/rcloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/att/rcloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/att/rcloud/statuses/{sha}","languages_url":"https://api.github.com/repos/att/rcloud/languages","stargazers_url":"https://api.github.com/repos/att/rcloud/stargazers","contributors_url":"https://api.github.com/repos/att/rcloud/contributors","subscribers_url":"https://api.github.com/repos/att/rcloud/subscribers","subscription_url":"https://api.github.com/repos/att/rcloud/subscription","commits_url":"https://api.github.com/repos/att/rcloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/att/rcloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/att/rcloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/att/rcloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/att/rcloud/contents/{+path}","compare_url":"https://api.github.com/repos/att/rcloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/att/rcloud/merges","archive_url":"https://api.github.com/repos/att/rcloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/att/rcloud/downloads","issues_url":"https://api.github.com/repos/att/rcloud/issues{/number}","pulls_url":"https://api.github.com/repos/att/rcloud/pulls{/number}","milestones_url":"https://api.github.com/repos/att/rcloud/milestones{/number}","notifications_url":"https://api.github.com/repos/att/rcloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/att/rcloud/labels{/name}","releases_url":"https://api.github.com/repos/att/rcloud/releases{/id}","created_at":"2012-07-31T19:32:52Z","updated_at":"2015-10-20T07:54:25Z","pushed_at":"2015-10-23T15:29:10Z","git_url":"git://github.com/att/rcloud.git","ssh_url":"git@github.com:att/rcloud.git","clone_url":"https://github.com/att/rcloud.git","svn_url":"https://github.com/att/rcloud","homepage":"","size":57045,"stargazers_count":209,"watchers_count":209,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":79,"mirror_url":null,"open_issues_count":342,"forks":79,"open_issues":342,"watchers":209,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/att/rcloud/pulls/1726"},"html":{"href":"https://github.com/att/rcloud/pull/1726"},"issue":{"href":"https://api.github.com/repos/att/rcloud/issues/1726"},"comments":{"href":"https://api.github.com/repos/att/rcloud/issues/1726/comments"},"review_comments":{"href":"https://api.github.com/repos/att/rcloud/pulls/1726/comments"},"review_comment":{"href":"https://api.github.com/repos/att/rcloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/att/rcloud/pulls/1726/commits"},"statuses":{"href":"https://api.github.com/repos/att/rcloud/statuses/ba1c96028e24318d92d8e1b2351ec4306dad80bf"}}}}