Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (52 sloc) 1.88 KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>FacetView</title>
<script type="text/javascript" src="vendor/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="vendor/linkify/1.0/jquery.linkify-1.0-min.js"></script>
<link rel="stylesheet" href="vendor/jquery-ui-1.8.18.custom/jquery-ui-1.8.18.custom.css">
<script type="text/javascript" src="vendor/jquery-ui-1.8.18.custom/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="jquery.facetview.js"></script>
<link rel="stylesheet" href="css/facetview.css">
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.facet-view-simple').each(function() {
$(this).facetview({
search_url: 'http://localhost:9200/bibserver/record/_search?',
search_index: 'elasticsearch',
datatype: 'json',
facets: [
{'field': 'journal.name.exact', 'display': 'journal'},
{'field': 'author.name.exact', 'display': 'author'},
{'field': 'year.exact', 'display': 'year'},
{'field': 'collection.exact', 'display': 'collection'},
],
search_sortby: [{'display':'year', 'field':'year.exact'},{'display':'journal','field':'journal.name.exact'}],
searchbox_fieldselect: [{'display':'author','field':'author.name'},{'display':'journal','field':'journal.name'}],
paging: {
size: 10
},
predefined_filters: {
'owner.exact': {'term':{'owner.exact':'test'}}
},
default_operator: "AND",
default_freetext_fuzzify: "*"
});
});
});
</script>
<style type="text/css">
.facet-view-simple{
width:800px;
height:600px;
margin:20px auto 0 auto;
}
</style>
</head>
<body>
<div class="facet-view-simple"></div>
</body>
</html>