Skip to content

Instantly share code, notes, and snippets.

@rococodogs
Last active July 5, 2018 19:04
Show Gist options
  • Save rococodogs/8ae2946a353c3a5793f8f4340038d30e to your computer and use it in GitHub Desktop.
Save rococodogs/8ae2946a353c3a5793f8f4340038d30e to your computer and use it in GitHub Desktop.
query a hyrax item in solr
(function () {
var url = new URL(window.location.href);
if (url.host.indexOf('localhost') == -1) {
return
}
var path = url.pathname;
if (path.indexOf('/concern/') != 0) {
return
}
var pieces = path.split('/');
var id = pieces[pieces.length - 1];
var solr_url = 'http://127.0.0.1:8983/solr/hydra-development/select?q=id:' + id;
window.open(solr_url);
})()
(function(){var n=new URL(window.location.href);if(-1!=n.host.indexOf("localhost")){var e=n.pathname;if(0==e.indexOf("/concern/")){var o=e.split("/"),t="http://127.0.0.1:8983/solr/hydra-development/select?q=id:"+o[o.length-1];window.open(t)}}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment