Class: FiltersSearchConnector

FiltersSearchConnector()

A model that creates listeners between a Filters collection and a SearchResults. It does not assume anything about how the search results or filters will be displayed in the UI or why those components need to be connected. It simply sends a new search when the filters have been changed.

Constructor

new FiltersSearchConnector()

Source:

Extends

  • Backbone.Model

Members

type :string

The type of Backbone.Model this is.
Type:
  • string
Since:
  • 2.25.0
Default Value:
  • "FiltersSearchConnector
Source:

Methods

connect()

Sets listeners on the Filters and SearchResults to trigger a search when the search changes
Since:
  • 2.22.0
Source:

defaults()

Properties:
Name Type Description
filters Filters A Filters collection to use for this search
searchResults SolrResults The SolrResults collection that the search results will be stored in
isConnected boolean Whether or not the model has listeners set between the Filters and SearchResults. Set this with the connect and disconnect methods.
Source:

disconnect()

Stops listening to changes in the Filters and SearchResults
Since:
  • 2.25.0
Source:

triggerSearch(resetPage)

Get Results from the Solr index by combining the Filter query string fragments in each Filter instance in the Search collection and querying Solr.
Parameters:
Name Type Description
resetPage boolean Whether or not to reset the page number to 0. Defaults to false.
Since:
  • 2.22.0
Source:
Fires:
  • SolrResults#event:toPage