-
Notifications
You must be signed in to change notification settings - Fork 91
/
index.html
126 lines (110 loc) · 4.04 KB
/
index.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!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">
<link rel="stylesheet" href="css/style.css">
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.facet-view-simple').facetview({
search_url: 'http://bibsoup.net/query?',
search_index: 'elasticsearch',
facets: [
{'field':'year.exact', 'display': 'year'},
{'field':'publisher.exact', 'display': 'publisher'}
],
paging: {
from: 0,
size: 10
}
});
// set up form
$('.demo-form').submit(function(e) {
e.preventDefault();
var $form = $(e.target);
var _data = {};
$.each($form.serializeArray(), function(idx, item) {
_data[item.name] = item.value;
});
$('.facet-view-here').facetview(_data);
});
});
</script>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">FacetView</a>
<ul class="nav">
<li><a href="#">Home</a></li>
<li><a href="http://github.com/okfn/facetview/">Github</a></li>
<li><a href="http://github.com/okfn/facetview/issues">Issues</a></li>
<li><a href="http://okfn.org/contact/">Contact</a></li>
</ul>
<a class="nav-logo pull-right" href="http://okfn.org/" title="An Open Knowledge Foundation Project">
<img src="http://assets.okfn.org/p/okfn/img/logo_28x30.png" alt="Open Knowledge Foundation logo" />
</a>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="page-header">
<h1>
FacetView <small>Pure Javascript Frontend for SOLR and ElasticSearch</small>
</h1>
</div>
<h4>
FacetView is a pure javascript frontend for ElasticSearch or SOLR
search indices.
</h4>
<h4>
It lets you easily embed a faceted browser and search front end into any web page. It also provides a micro-framework you can build on when creating user interfaces to SOLR and ElasticSearch.
</h4>
<h2>Demo</h2>
<div class="facet-view-simple"></div>
<!--
<h2>More Complex Demo</h2>
<p>Here we provide you with the option to supply a SOLR or ES endpoint. In
normal usage you will configure the search endpoint when you initialize
FacetView in your code.</p>
<form class="demo-form">
<fieldset>
<label for="search_url">SOLR/ES Endpoint</label>
<div class="input">
<input type="text" name="search_url" class="span9" value="http://openspending.org/api/search?" />
</div>
<div class="clearfix"></div>
<div class="input">
<div class="inline-inputs">
<input type="radio" checked="" name="search_index" value="solr" /><span>SOLR</span>
<input type="radio" name="search_index" value="elasticsearch" /><span>ElasticSearch</span>
</div>
</div>
<div class="clearfix"></div>
<div class="input">
<button type="submit" class="btn primary">Go »</button>
</div>
</fieldset>
</form>
<div class="facet-view-here"></div>
-->
<h2>Use It Yourself</h2>
<p>See the <a href="https://github.com/okfn/facetview#readme">README on the GitHub repo</a>.</p>
</div>
<footer>
<p>© Open Knowledge Foundation and Cottage Labs 2011. <a
href="http://opendefinition.org/">Openly Licensed</a>.</p>
</footer>
</div>
</body>
</html>