Find file
127 lines (110 sloc) 4.04 KB
<!DOCTYPE html>
<meta charset="utf-8" />
<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($) {
search_url: '',
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) {
var $form = $(;
var _data = {};
$.each($form.serializeArray(), function(idx, item) {
_data[] = item.value;
<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="">Github</a></li>
<li><a href="">Issues</a></li>
<li><a href="">Contact</a></li>
<a class="nav-logo pull-right" href="" title="An Open Knowledge Foundation Project">
<img src="" alt="Open Knowledge Foundation logo" />
<div class="container">
<div class="content">
<div class="page-header">
FacetView <small>Pure Javascript Frontend for SOLR and ElasticSearch</small>
FacetView is a pure javascript frontend for ElasticSearch or SOLR
search indices.
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.
<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">
<label for="search_url">SOLR/ES Endpoint</label>
<div class="input">
<input type="text" name="search_url" class="span9" value="" />
<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 class="clearfix"></div>
<div class="input">
<button type="submit" class="btn primary">Go &raquo;</button>
<div class="facet-view-here"></div>
<h2>Use It Yourself</h2>
<p>See the <a href="">README on the GitHub repo</a>.</p>
<p>&copy; Open Knowledge Foundation and Cottage Labs 2011. <a
href="">Openly Licensed</a>.</p>