@elastic/search-ui-site-search-connector
TypeScript icon, indicating that this package has built-in type declarations

1.21.5 • Public • Published

search-ui-site-search-connector

Part of the Search UI project.

This Connector is used to connect Search UI to Elastic's Site Search API.

While Site Search supports multiple document types, Search UI will only support a single document type, and it must be provided up front when creating the connector.

Note that Site Search does not support certain features of Search UI:

  • disjunctiveFacets or disjunctiveFacetsAnalyticsTags configuration options
  • Only value facets are allowed, no range facet support.
  • sort option is not supported on facets.
  • size option is not supported on facets.
  • Does not support multiple filters applied to a single field.
  • Cannot apply more than 1 range filter on a single field.
  • Analytics tags are not supported in click.
  • suggestions are not supported in autocomplete, only results
  • The none filter type is not supported.

Usage

npm install --save @elastic/search-ui-site-search-connector
import SiteSearchAPIConnector from "@elastic/search-ui-site-search-connector";

const connector = new SiteSearchAPIConnector({
  documentType: "national-parks",
  engineKey: "Z41R5U3Hi4s5gp1aw7kA"
});

Classes

SiteSearchAPIConnector

Typedefs

next : function
hook : function
Options

SiteSearchAPIConnector

Kind: global class

new SiteSearchAPIConnector(options)

Param Type
options Options

next : function

Kind: global typedef

Param Type Description
updatedQueryOptions Object The options to send to the API

hook : function

Kind: global typedef

Param Type Description
queryOptions Object The options that are about to be sent to the API
next next The options that are about to be sent to the API

Options

Kind: global typedef

Param Type Default Description
documentType string Document Type found in your Site Search Dashboard
engineKey string Credential found in your Site Search Dashboard
beforeSearchCall hook (queryOptions,next)=>next(queryOptions) A hook to amend query options before the request is sent to the API in a query on an "onSearch" event.
beforeAutocompleteResultsCall hook (queryOptions,next)=>next(queryOptions) A hook to amend query options before the request is sent to the API in a "results" query on an "onAutocomplete" event.

Readme

Keywords

none

Package Sidebar

Install

npm i @elastic/search-ui-site-search-connector

Weekly Downloads

1,060

Version

1.21.5

License

Apache-2.0

Unpacked Size

126 kB

Total Files

57

Last publish

Collaborators

  • jbwelastic
  • weronika-olejniczak
  • kibanamachine
  • obltmachine
  • kc13greiner
  • elena-shostak
  • miguel-elastic
  • lenegadewoll
  • cbishopewc
  • cindy_c
  • asnyder-elastic
  • lgestc
  • patryk.kopycinski
  • banerjeesoham004
  • legrego
  • bradtimmerman
  • yan.savitski
  • jeramysoucy
  • tkajtoch
  • johnwcambra
  • colleen.mcginnis
  • kyrspl
  • phoey1
  • verogo
  • breehall
  • jen-huang
  • delvedor
  • lukasolson
  • ccowan
  • jbudz
  • thomasneirynck
  • weltenwort
  • pugnascotia
  • zinckiwi
  • brandon.kobel
  • nreese
  • mgreau
  • jonahbull
  • jarpy
  • leathekd
  • lukeelmers
  • ddillinger
  • joshdover
  • jasonstoltz
  • bamieh
  • markov00
  • joshmock
  • vignesh.shanmugam
  • watson
  • rhodesjason
  • jmlrt
  • mattkime
  • constancecchen
  • afoucret
  • nickpeihl
  • axw
  • mistic
  • elasticmachine
  • gtback
  • pickypg
  • trentm
  • andrewvc-elastic
  • jorge.sanz
  • stratoula
  • nkammah
  • streamich
  • nickofthyme
  • chloeruka