forked from rufuspollock-okfn/facetview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.html
63 lines (51 loc) · 1.86 KB
/
local.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!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'}}
}
});
});
});
</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>
<div class="facet-view-simple"></div>
</body>
</html>