Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 72af40b03d
Fetching contributors…

Cannot retrieve contributors at this time

127 lines (110 sloc) 4.133 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">
<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 &raquo;</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>&copy; Open Knowledge Foundation and Cottage Labs 2011. <a
href="http://opendefinition.org/">Openly Licensed</a>.</p>
</footer>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.