This release includes a brand new suggestions API 🎉 (UI components based on this API coming up next) and enhancements to query rules.
Enhancements
- Introduces a new
suggestion
type of query as part of ReactiveSearch API that allows building a suggestions (or typeahead) UI experience by returning recent, popular, index and promoted suggestions as per the requested size in a single API request - Introduces an improved suggestions UI preferences plugin (and accompanying control plane view) for being able to configure how the suggestion type of query can work
- Adds support for more variables as part of the trigger expression of query rules. New variables that are available now are:
Type string // Type of query, can be: search|term|suggestion|geo|range
Origin string // e.g. https://my-search.domain.com
Referer string // e.g. https://my-search.domain.com/path?q=hello
IPv4 string // e.g. 29.120.12.12
IPv6 string // e.g. 2001:db8:3333:4444:5555:6666:7777:8888
CustomEvents map[string]string // Custom events passed in ReactiveSearch API are also accessible. e.g. if 'platform': 'mac' is passed, it's accessible as CustomEvents['platform'] variable
- Adds support for previewing a query rule's side-effects before saving the rule. This is implemented using the
settings.queryRule
key in ReactiveSearch API - Records end-user city (earlier, only country was recorded) with each search session
Fixes
- Fixes an issue where a private IP address (e.g. 127.0.0.1) forwarded using the
X-Forwarded-For
header threw an authorization error. It now successfully works with the side effect being a less accurate recording of user analytics. - Fixes an issue with the stored query implementation where it's use in ReactiveSearch API when disabling the query DSL threw a 400 error.
- Introduces a notion of client provided timestamp to handle search sessions more accurately. The header we accept here is
X-Timestamp
with the ReactiveSearch API endpoint. This change will typically get implemented in appbase-js, ReactiveSearch and Searchbox libraries, so no changes will be required by users to take advantage of this.