{"number":366,"pull_request":{"number":366,"issue_url":"https://github.com/sakaiproject/nakamura/issues/366","head":{"label":"ctweney:kern-2266","repo":{"master_branch":"myb-0.10","name":"nakamura","created_at":"2010-12-21T21:37:34Z","size":192,"clone_url":"https://github.com/ctweney/nakamura.git","private":false,"updated_at":"2011-10-21T20:02:30Z","watchers":1,"ssh_url":"git@github.com:ctweney/nakamura.git","url":"https://api.github.com/repos/ctweney/nakamura","git_url":"git://github.com/ctweney/nakamura.git","language":"Java","fork":true,"svn_url":"https://svn.github.com/ctweney/nakamura","id":1188396,"pushed_at":"2011-10-21T20:02:30Z","open_issues":0,"homepage":"http://confluence.sakaiproject.org/display/GROUPS","description":"Fork from Ian's K2 quasi-trunk","forks":0,"html_url":"https://github.com/ctweney/nakamura","owner":{"avatar_url":"https://secure.gravatar.com/avatar/963423426d6da2a4d30657d90310098e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"963423426d6da2a4d30657d90310098e","url":"https://api.github.com/users/ctweney","id":453309,"login":"ctweney"}},"sha":"93739b3e9be4746ab25bef31a3336c35a13dca13","ref":"kern-2266","user":{"avatar_url":"https://secure.gravatar.com/avatar/963423426d6da2a4d30657d90310098e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"963423426d6da2a4d30657d90310098e","url":"https://api.github.com/users/ctweney","id":453309,"login":"ctweney"}},"merged_by":null,"created_at":"2011-10-21T20:05:17Z","changed_files":43,"merged":false,"body":"In my implementation I've made it possible to ask Solr for faceting fields. You do this on the search template as part of the sakai:query-template-options property, like so: \r\n\r\n\"sakai:query-template-options\": { \r\n      \"sort\": \"${sortOn} ${sortOrder}\", \r\n      \"facet\" : true, \r\n      \"facet.field\" : \"tag\" \r\n} \r\n\r\nThe response from SolrSearchServlet looks like so: \r\n\r\n{ \r\n  \"items\": 12, \r\n  \"results\": [ \r\n      ... many results snipped ... \r\n  ], \r\n  \"facet_fields\": [{ \r\n      \"tag\": { \r\n        \"foo\": 2, \r\n        \"bork\": 1 \r\n      } \r\n    } \r\n  ], \r\n  \"total\": 3 \r\n} \r\n\r\nYou can facet on more than one field, as long as you are faceting on fields that are in the Solr index: \r\n\r\n\"sakai:query-template-options\": { \r\n      \"sort\": \"${sortOn} ${sortOrder}\", \r\n      \"facet\" : true, \r\n      \"facet.field\" : [ \"tag\", \"name\" ] \r\n} \r\n\r\nAlong the way I refactored SolrSearchServlet to make its collections of various helpers cleaner and less duplicative. You can also have more than 1 response decorator. \r\n\r\nGit commit msg:\r\n\r\ncommit 7bbda000a1f2b9f498b3d1ec186d17eebc0a2c6a\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 21 13:00:32 2011 -0700\r\n\r\n    KERN-2266 Support generic facet fields in solr searches; update search templates to ask for tag facets\r\n\r\ncommit 4bb020f36357fed636130d2e9c2bd162d142fc26\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 21 09:56:00 2011 -0700\r\n\r\n    KERN-2266 Move search helper trackers to solr search impl folder\r\n\r\ncommit c3450697fd92f18ef95ba03b369bd9e1c379e297\r\nMerge: c3b0752 ad20a34\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 21 09:06:14 2011 -0700\r\n\r\n    Merge remote branch 'central/master' into kern-2266-wip\r\n\r\n    * central/master:\r\n      KERN-2210 - adding use of ConnectionManager to ProfileServlet and added integration test for authprofile feed\r\n      NOJIRA Added metatype=true to service. Minor formatting\r\n      KERN-2095 Have RequestInfo parse URL parameters if supplied.\r\n      NOJIRA make preview_processor run as a daemon\r\n      KERN-2292 fix artifact id of files.impl bundle.\r\n      KERN-2292 update list.xml to use the two new bundles\r\n      KERN-2292 create an API and impl bundle for the files module, permitting hot redeploy\r\n      NOJIRA Updated refs to 1.1-SNAPSHOT from 0.11-SNAPSHOT\r\n      KERN-2290 Removed local httpclient bundle and added servicemix's bundle. Changed ref in captcha bundle to point to httpclient dep.\r\n      fix problems of OSGI property\r\n      KERN-2254 - fixing the issues Carl documented in pull request comments\r\n      KERN-2254 squash commit of search and bundle splitting after merge with master\r\n      NOJIRA removing redundant dependency declaration for commons.json\r\n      using OSGI property to config isHierarchical\r\n      KERN-2265: support 2 types of IMS-CP import\r\n\r\ncommit c3b075284e062e11dc83c399ca80b5c71720756e\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 21 06:11:20 2011 -0700\r\n\r\n    KERN-2266 Add tagcloud support to SolrSearchResultSet\r\n\r\ncommit 37bc5c16121d3010e8b80a7fa76e76fc372c768d\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 14 15:40:22 2011 -0700\r\n\r\n    KERN-2266 Separate SearchResultDecorator from SearchResultProcessor, and allow multiple decorators on a single node\r\n\r\ncommit 97f9d72926e0c15c4121e7280078ef7093290775\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 14 10:56:35 2011 -0700\r\n\r\n    KERN-2266 Use the new tracker pattern to track SearchPropertyProviders\r\n\r\ncommit 15764ee74c8fd372e76a707f1bc47732c11842e2\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 14 10:43:33 2011 -0700\r\n\r\n    KERN-2266 Introduce the DelayedSolrSearchServletHelperTracker in case it's ever useful; use the helpertrackers in SolrSearchServlet\r\n\r\ncommit eadd2659399c7dfd49676ae6554a5fc3e4e56ee0\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Fri Oct 14 10:00:08 2011 -0700\r\n\r\n    KERN-2266 Simpler version of the helper tracker; rolled back some of the SolrSearchServlet changes until I can verify all behavior\r\n\r\ncommit 899ffc6814ca563ed0621f88f4d4743ae70fa814\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Thu Oct 13 16:06:21 2011 -0700\r\n\r\n    KERN-2266 Refactor the processor and batchProcessor tracking code into SolrSearchServletHelperTracker instances; not everything works correctly yet, but this shows the pattern\r\n\r\ncommit 2cbc9dc895983cacb4b2ec70cfe7ffc0f0af0970\r\nAuthor: Chris Tweney <chris@media.berkeley.edu>\r\nDate:   Thu Oct 13 11:45:07 2011 -0700\r\n\r\n    KERN-2266 Clean up warnings and useless comments in SolrSearchServlet","comments":0,"title":"KERN-2266 Add tag clouds to solr searches; improve SolrSearchServlet","additions":678,"diff_url":"https://github.com/sakaiproject/nakamura/pull/366.diff","updated_at":"2011-10-21T20:05:17Z","url":"https://api.github.com/repos/sakaiproject/nakamura/pulls/366","id":423581,"patch_url":"https://github.com/sakaiproject/nakamura/pull/366.patch","mergeable":null,"merged_at":null,"commits":1,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/963423426d6da2a4d30657d90310098e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"963423426d6da2a4d30657d90310098e","url":"https://api.github.com/users/ctweney","id":453309,"login":"ctweney"},"deletions":419,"html_url":"https://github.com/sakaiproject/nakamura/pull/366","base":{"label":"sakaiproject:master","repo":{"master_branch":null,"name":"nakamura","created_at":"2010-07-07T12:44:22Z","size":3248,"clone_url":"https://github.com/sakaiproject/nakamura.git","private":false,"updated_at":"2011-10-21T20:05:17Z","watchers":86,"ssh_url":"git@github.com:sakaiproject/nakamura.git","url":"https://api.github.com/repos/sakaiproject/nakamura","git_url":"git://github.com/sakaiproject/nakamura.git","language":"Java","fork":true,"svn_url":"https://svn.github.com/sakaiproject/nakamura","id":761713,"pushed_at":"2011-10-21T20:05:17Z","open_issues":5,"homepage":"http://sakaiproject.org","description":"","forks":64,"html_url":"https://github.com/sakaiproject/nakamura","owner":{"avatar_url":"https://secure.gravatar.com/avatar/3dd7a22e50fe5c570e6315c2b96031a9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"3dd7a22e50fe5c570e6315c2b96031a9","url":"https://api.github.com/users/sakaiproject","id":314726,"login":"sakaiproject"}},"sha":"463b0657001d4b751321371b361e2018b49c299f","ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/3dd7a22e50fe5c570e6315c2b96031a9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"3dd7a22e50fe5c570e6315c2b96031a9","url":"https://api.github.com/users/sakaiproject","id":314726,"login":"sakaiproject"}},"state":"open"},"action":"opened"}