SOLR-AJAX: Single Page Faceted Search Interface to Apache Solr/Lucene

SOLR-AJAX is a single page Javascript web application for searching and presenting document, image and location data from an Apache Solr/Lucene search index. The application can be installed and running with almost no setup. It includes interfaces and display components for:

  • Document search
  • Image search
  • Map search

A live demo is available online at


This application requires a functioning web server and Apache Solr/Lucene search index.

  1. Download and unzip the SOLR-AJAX package. The unzipped archive will contain a number of subdirectories. Copy the contents of the app subdirectory to your web server.

  2. Each of the sample HTML search pages (documents.html, images.html, location.html) runs a single-page Javascript application that is responsible for executing search actions and displaying results. The application will use configuration values specified in the HTML to determine where to send its queries. In particular, the "data-source" attribute tells the application what the URL for you Solr core is. Set the "data-source" attribute to the URL to your Solr core.

    ex. data-source=""

The URL to your Solr core must be resolveable and accessible by the browser. If you are running the application as a public service, then the URL to your Solr core must be publicly accessible.

  1. Load the HTML search page in your browser and attempt to execute searches against your Solr index. If you experience any problems, open your browser console. You should see log entries for each search query that is executed, and information about any errors that may have occurred.


SOLR-AJAX is a project of the eScholarship Research Center at the University of Melbourne. For more information about the project, please contact us at:

eScholarship Research Center University of Melbourne Parkville, Victoria Australia




See the LICENSE.txt file for copyright and license information.

Version History


  • Set all logging to DEBUG or ERROR instead of INFO
  • Complete unit tests
  • Reimplement Solr, associated controllers to use promises throughout
  • Implement Grunt, Travis configuration for automatic linting, testing, minifying
  • Implement modified map clusterer function to spread out stacked pins, from
  • DateFacetController should work with either of year, or start/end date ranges or ... split into separate controllers
  • Finish graph controller, graph service component



? Remove JQuery, JQuery UI dependencies for SearchBoxController


  • Upgraded testing setup
  • Partial unit tests for SelectionSet, Solr services
  • Complete unit tests for TextFilter, Utils service


  • Forked SimpleSearch into separate application, repository
  • Added IE 7/8/9 polyfill to support JSON, moved HTML5 shim to top of HEAD
  • IE 7 does not provide console.log service. Wrapped logging calls in a check for window.console object
  • Removed unnecessary application configuration values, extraneous functions
  • Updated SolrSearchService to use streamlined configuration
  • Added routing to application, to enable RESTful representation of the query
  • Updated controllers to determine their state from the current location


  • Removed TypeAhead directive
  • Close search hints list on submit action
  • Histogram of search results by date
  • Added SimpleSearch application, associated controllers and directives


  • On page load, parses location to determine if there is a starting search query, then executes query
  • Added isSelected property to FieldFacetController
  • Moved getFacets, getFacetCounts methods from SolrSearchService into SolrQuery
  • Document search results include state and exist dates.
  • Document and location search results include a thumbnail image.
  • Added AutoComplete filter as an alternate to the Bootstrap Typeahead.


  • Query parameters are now named so that they can be individually managed by different controllers
  • Split map query from document query in location based search view
  • Fixed formatting of document search results in map view
  • MapController listens for updates on the SelectionSetService and puts focus on selected item
  • One map info window should be open at a time
  • Created SelectionSetService


  • Entity titles include the exist dates
  • Modified SolrSearchService to allow multiple query parts
  • Filter results by date ranges using DateFacetController
  • Partial unit tests for SolrFacet, SolrQuery, SolrSearchService
  • SolrSearchService broadcasts updates for individual named queries
  • Entity map marker and document record includes exist dates


  • Removed Angular partials
  • Initial implementation of DateRangeController, displays min/max years in the whole data set
  • Removed RangeFacetController
  • Updated FacetSelectionController to display and remove facets from a named query in the SolrSearchService
  • Updated FieldFacetController to get results from SolrSearchService, add facet constraint to named query


  • Named and default queries in SolrSearchService
  • Marker info window closes when clicking its close button


  • Updated DocumentSearchResultsController to work with SolrSearchService
  • Updated pagination setup on DocumentSearchController to work with SolrSearchService
  • Updated SearchHistoryController to only record changes in the query object


  • Defined default map cluster icon options
  • SearchBoxController now updates search query in SolrSearchService
  • Google API key removed from script loading call
  • Reorganized application controllers to use Solr search service
  • Updated DocumentSearchResultsController to use SolrSearchService
  • Replaced DocumentSearchController with DocumentSearchResultsController for text based display of search results
  • Created SolrSearchService
  • Map starts at specified coordinates, or Australia if not specified
  • Added mapping default arguments to application constants


  • Renamed controllers throughout
  • Moved global classes into separate common.js file
  • Created separate document, image, location search applications and pages
  • Updated application routing for document, image, location searching
  • Created document, image, location partial views
  • Reorganized application to match Angular Seed Project implementation
  • Made various free floating methods members of their respective controllers


  • Revised pagination function
  • Created date range facet controller
  • Set minimum facet count threshold for facet list
  • Fixed missing facet counts


  • Update the location fragment to reflect the current query
  • Hide pagination index when there are no results
  • Parse URL fragment to get starting query parameters
  • Prepended && to facet URLs to aid parsing


  • Documentation in JsDoc format throughout
  • Faceted search on fields
  • Facet parameters added into search query url
  • Facet list is part of the query object, to ensure it becomes part of the search history
  • Facet controller for basic text field search
  • Defined an init method for each controller to take care of all startup actions
  • Added SOLR_CORE as an application constant
  • Created Selection controller to display and manage the set of facets, constraints
  • Query history panel displays the last N queries
  • Autocomplete search hints in keyword search box


  • Paged search results
  • Paginated search index
  • Basic AJAX keyword search through text field entry
  • Removed AJAX-Solr and replaced with Angular.js


  • First pass implementation using AJAX-Solr
  • Added Bootstrap library


  • Static mockup of interface

Known Issues