Releases: sajari/sdk-react
Releases · sajari/sdk-react
v1.2.0
Added new methods to Filter
for setting/getting the available options:
getOptions()
: returns all the options in the filter.setOptions(opts)
: merges the passedopts
dictionary with the filter options.
Updated Filter
events, including a new event:
selectionUpdatedEvent
: triggered when the filter selection has been updated.optionsUpdatedEvent
: triggered when the filter options have been updated.
Refactored Values
events to be consistent with Filter
:
valuesChangedEvent
->valuesUpdatedEvent
.
Added more convenience methods to Response
class:
getResults()
: returns the results from the response.getTotalResults()
: returns the total number of results in a search.getTime()
: returns the time spent running the query.getAggregates()
: returns any aggregates run with the search.
v1.1.0
Pipeline constructor has changed:
/**
* Constructs a Pipeline object.
* @param {string} project Name of the project
* @param {string} collection Name of the collection
* @param {string} name Name of the pipeline.
* @param {Sajari.Tracking|undefined} [tracking=ClickTracking()] Default tracking to use in searches.
*/
constructor(project, collection, name, tracking = ClickTracking()) { ///...
Pipeline listeners now receive a Response
object which wraps the raw search response with helpers and convenience methods.
The sajari
package now comes with sajari-react
, no need to import it separately.