Helper Reference
Our javascript helper includes the following param options.
See something you need to be configurable but isn't directly? Get in touch.
General Parameters #
applicationId
- The application id for the algolia account. If not directly passed will pull the value from the
data-applicationId
param attached to the search form.
searchApiKey
- The search api key for the algolia account. If not directly passed will pull the value from the
data-searchApiKey
param attached to the search form.
index
- The index name to search agains. If not directly passed will pull the value from the
data-index
param attached to the search form.
input
default: $('#searchinput')
- The primary search input element. i.e. the actual search text input.
searchform
default: $('#searchform')
- The search form to hook our search against.
resultsContainer
default: $('#results')
- The results container to attach search results to.
paginationContainer
default: $('#pagination')
- The pagination container to attach any pagination output to.
hitsPerPage
default: 25
- The number of results to return per page
searchOnLoad
default: true
- Set to false to prevent an initial search when the page immediately loads.
Facet Parameters #
maxValuesPerFacet
default: 10
- The maximum number of facet options to display per facet type.
facets
default: []
- An array of the facets to expose. These first need to be configured on the index from algolia as detailed : Faceted Search
disjunctiveFacets
default: []
- An array of the disjunctive facets to expose. These first need to be configured on the index from algolia as detailed : Faceted Search
facetsLabels
default: []
- An associative array of keys > labels. If passed these will be available in the facet templates as
title
facetsOrderOfDisplay
default: natural order
- An array of facet names. If passed this order will override the natural order as passed in the initial
facets
and disjunctiveFacets
arrays. Very useful if you need to mix facets and disjunctive facets in between each other.
facetsSlider
default: []
- An array of the attributes to use for a slider facet. This is designed to be used with numeric / pricing fields, and uses the
slider-template
outputting. It behaves like a disjunctive range search.
facetsForcedRefinement
default []
- An associative array of forced refinements you want to be applied for all searches. Will be added to all searches and reapplied after every clear action. Very useful if you want to have some forced filtering not directly editable by the user. (i.e. for limiting results by a user's location)