App Search Connector
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Stack
Generally available
App Search connector for Search UI is deprecated and will no longer be supported. Please migrate to Elasticsearch Connector for continued support.
This Connector is used to connect Search UI to Elastic’s App Search API.
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"
});
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
});
| Param | Description |
|---|---|
| searchKey | Required. String. Credential found in your App Search Dashboard |
| engineName | Required. String. Engine to query, found in your App Search Dashboard |
| endpointBase | Required. String. Endpoint path, found in your App Search Dashboard |
| cacheResponses | Optional. Boolean. Default is true. By default, connector will keep an in browser memory result cache of previous requests. |
| hostIdentifier | Optional. Useful when proxying the Swiftype API or developing against a local API server. |
| beforeSearchCall | Optional. A hook to amend query options before the request is sent to the API in a query on an "onSearch" event. |
| beforeAutocompleteResultsCall | Optional. A hook to amend query options before the request is sent to the API in a "results" query on an "onAutocomplete" event. |
| beforeAutocompleteSuggestionsCall | Optional. A hook to amend query options before the request is sent to the API in a "suggestions" query on an "onAutocomplete" event. |