1.21.2 • Published 2 days ago

@elastic/search-ui-app-search-connector v1.21.2

Weekly downloads
9,034
License
Apache-2.0
Repository
github
Last release
2 days ago

search-ui-app-search-connector

Part of the Search UI project.

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

Usage

npm install --save @elastic/search-ui-app-search-connector
import AppSearchAPIConnector from "@elastic/search-ui-app-search-connector";

const connector = new AppSearchAPIConnector({
  searchKey: "search-371auk61r2bwqtdzocdgutmg",
  engineName: "search-ui-examples",
  endpointBase: "http://127.0.0.1:3002"
});

Swiftype.com App Search users:

When using the SaaS version available on swiftype.com of App Search, you can configure the connector using your hostIdentifier instead of the endpointBase parameter. The hostIdentifier can be found within the Credentials menu.

const connector = new AppSearchAPIConnector({
  searchKey: "search-371auk61r2bwqtdzocdgutmg",
  engineName: "search-ui-examples",
  hostIdentifier: "host-c5s2mj"
});

Additional options

Additional options will be passed through to the underlying APIclient. Any valid parameter of the client can be used.

const connector = new AppSearchAPIConnector({
  searchKey: "search-371auk61r2bwqtdzocdgutmg",
  engineName: "search-ui-examples",
  endpointBase: "http://127.0.0.1:3002",
  cacheResponses: false
});

Classes

Typedefs

AppSearchAPIConnector

Kind: global class

new AppSearchAPIConnector(options)

ParamType
optionsOptions

next : function

Kind: global typedef

ParamTypeDescription
updatedQueryOptionsObjectThe options to send to the API

hook : function

Kind: global typedef

ParamTypeDescription
queryOptionsObjectThe options that are about to be sent to the API
nextnextThe options that are about to be sent to the API

Options

Kind: global typedef

ParamTypeDefaultDescription
searchKeystringCredential found in your App Search Dashboard
engineNamestringEngine to query, found in your App Search Dashboard
hostIdentifierstringCredential found in your App Search Dashboard Useful when proxying the Swiftype API or developing against a local API server.
beforeSearchCallhook(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.
beforeAutocompleteResultsCallhook(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.
beforeAutocompleteSuggestionsCallhook(queryOptions,next)=>next(queryOptions)A hook to amend query options before the request is sent to the API in a "suggestions" query on an "onAutocomplete" event.
endpointBasestring""Overrides the base of the Swiftype API endpoint completely.
1.21.2

2 days ago

1.21.1

1 month ago

1.21.0

2 months ago

1.19.1

1 year ago

1.20.1

12 months ago

1.20.2

12 months ago

1.20.0

12 months ago

1.19.0

1 year ago

1.18.1

2 years ago

1.18.0

2 years ago

1.8.2

2 years ago

1.18.3

1 year ago

1.18.2

2 years ago

1.14.0

2 years ago

1.16.0

2 years ago

1.15.0

2 years ago

1.13.0

2 years ago

1.17.1

2 years ago

1.17.0

2 years ago

1.12.1

2 years ago

1.12.0

2 years ago

1.11.3

2 years ago

1.11.0

2 years ago

1.11.2

2 years ago

1.11.1

2 years ago

1.11.0-canary.0

2 years ago

1.10.2

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.9.0

2 years ago

1.10.0-rc.1

2 years ago

1.10.0-rc.0

2 years ago

1.8.0

2 years ago

1.8.0-rc.0

2 years ago

1.8.0-canary.1

2 years ago

1.6.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.1-rc.0

3 years ago

1.5.1

3 years ago

1.5.0-rc.3

4 years ago

1.5.0

4 years ago

1.5.0-rc.0

4 years ago

1.4.1

4 years ago

1.4.1-rc.0

4 years ago

1.4.0

4 years ago

1.4.0-rc.4

4 years ago

1.4.0-rc.3

4 years ago

1.3.3

4 years ago

1.4.0-canary.6

4 years ago

1.4.0-rc.0

4 years ago

1.4.0-canary.5

4 years ago

1.3.3-minor.2

4 years ago

1.3.3-minor.3

4 years ago

1.3.3-minor.8

4 years ago

1.3.3-minor.1

4 years ago

1.3.3-canary.1

4 years ago

1.3.3-canary.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.3.0-canary.11

4 years ago

1.2.0

5 years ago

1.2.0-rc.0

5 years ago

1.1.0

5 years ago

1.0.1-canary1.22

5 years ago

1.0.1-canary.22

5 years ago

1.0.0

5 years ago

1.0.0-rc.2

5 years ago

1.0.0-rc.1

5 years ago

1.0.0-canary.3

5 years ago

1.0.0-alpha.1

5 years ago

1.0.0-rc.0

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.2-alpha.6

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago