Spyglass provides a simple search interface for Solr using EmberJS.
Spyglass comes with many of the search components you need to create a lightweight search interface right out of the box.
- Searchers that return a result from a given Solr url,
- a Search Box which is a simple input tied to its searcher,
- Result Sets that automatically show the results returned by their searchers, and
- Facets which toggle search parameters. Both result sets and facets are extensions of ‘SearcherObservers’ which update automatically when their linked ‘searcher’ has new objects.
For a little more background until we get a project page up go here.
- Download the Spyglass binary from the releases tab.
- Edit the example
index.htmlfiles to point to your Solr instance.
- Open the page in your browser, or deploy it to your own site.
Running Spyglass locally allows you to easily customize the interface, and sets up a good development environment for your project.
To build Spyglass from source you will need:
- Navigate to the
gruntfolder within your cloned Spyglass repository.
- Great, now run
grunt serverto launch Spyglass and automatically start compiling your changes in real-time.
Now that you are set up you can also run
grunt build to generate a distribution version of your app.