Jay Taylor's notes

back to listing index

DocumentCloud's VisualSearch.js

[web search]
Original source (documentcloud.github.io)
Tags: search javascript user-interface documentcloud.github.io
Clipped on: 2014-03-12

VisualSearch.js

Created by Samuel Clay, @samuelclay.

VisualSearch.js enhances ordinary search boxes with the ability to autocomplete faceted search queries. Specify the facets for completion, along with the completable values for any facet. You can retrieve the search query as a structured object, so you don't have to parse the query string yourself.

Here's an example of a search on DocumentCloud.org that uses facets.

The project is hosted on GitHub. You can report bugs and discuss features on the issues page, on Freenode in the #documentcloud channel, or send tweets to @documentcloud.

VisualSearch.js is an open-source component of DocumentCloud.

The complete annotated source code is also available.

Table of Contents

Demo | Downloads | Usage | Links | Change Log

Demo Try searching for: account, filter, access, title, city, state, or country.

country:
United States
U.S. State:
New York
account:
1-amanda
ยป You searched for: country: "United States" "U.S. State": "New York" account: 1-amanda. (3 facets)

Downloads (Right-click, and use "Save As")

0. Everything (visualsearch.zip)
Download everything
1. VisualSearch JavaScript (visualsearch.js)
Production Version (0.5.0) 7kb, Minified and Gzipped
Development Version (0.5.0) 63kb, Uncompressed with Comments
2. VisualSearch Stylesheets (visualsearch.css)
You should include both the datauri and image urls versions. See how to include both
Production Version - datauri 4kb, Minified and Gzipped
Production Version - image urls 4kb, Minified and Gzipped
Development Version 8kb, Uncompressed with Comments
3. VisualSearch Images
Image (Asset 1/3) alt=