You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> A first-party JavaScript client for building excellent, relevant search experiences with [Elastic App Search](https://www.elastic.co/products/app-search/service).
5
+
> A first-party JavaScript client for building excellent, relevant search experiences with [Elastic App Search](https://www.elastic.co/products/app-search).
6
6
7
7
## Contents
8
8
@@ -60,7 +60,7 @@ To guarantee compatibility, use the most recent version of this library within t
60
60
61
61
For example, for App Search `7.3`, use `7.3` of this library or above, but not `8.0`.
62
62
63
-
If you are a [SaaS](https://app.swiftype.com/as)user, simply use the most recent version of this library.
63
+
If you are using the [SaaS version available on swiftype.com](https://app.swiftype.com/as)of App Search, you should use the version 7.5.x of the client.
64
64
65
65
## Browser support
66
66
@@ -76,43 +76,44 @@ like https://github.com/github/fetch.
76
76
77
77
### Setup: Configuring the client and authentication
78
78
79
-
Using this client assumes that you have already created an [App Search](https://swiftype.com/app-search) account, and subsequently created an Engine. You'll need to configure the client with the name of your Engine and your authentication credentials, which can be found here: https://app.swiftype.com/as/credentials.
79
+
Using this client assumes that you have already an instance of [Elastic App Search](https://www.elastic.co/products/app-search) up and running.
80
+
81
+
The client is configured using the `searchKey`, `endpointBase`, and `engineName` parameters.
80
82
81
83
```javascript
82
84
var client =ElasticAppSearch.createClient({
83
-
hostIdentifier:"host-c5s2mj",
84
85
searchKey:"search-mu75psc5egt9ppzuycnc2mc3",
86
+
endpointBase:"http://127.0.0.1:3002",
85
87
engineName:"favorite-videos"
86
88
});
87
89
```
88
90
89
-
\* Please note that you should only ever use a **Public Search Key** within Javascript code on the browser. By default, your account should have a Key prefixed with `search-` that is read-only. More information can be found in the [documentation](https://swiftype.com/documentation/app-search/authentication).
| hostIdentifier | No | Your **Host Identifier**, should start with `host-`. Required unless explicitly setting `endpointBase`|
96
-
| searchKey | Yes | Your **Public Search Key**. It should start with `search-`. |
97
-
| engineName | Yes ||
98
-
| endpointBase | No | Overrides the base of the App Search API endpoint completely. Useful when proxying the App Search API, developing against a local server, or a Managed Deploy. Ex. "http://localhost:3002"|
99
-
| cacheResponses | No | Whether or not API responses should be cached. Default: `true`. |
100
-
| additionalHeaders | No | An Object with keys and values that will be converted to header names and values on all API requests |
91
+
\* Please note that you should only ever use a **Public Search Key** within Javascript code on the browser. By default, your account should have a Key prefixed with `search-` that is read-only. More information can be found in the [documentation](https://swiftype.com/documentation/app-search/authentication).
101
92
102
-
### Using with App Search Managed Deploys
93
+
### Swiftype.com App Search users:
103
94
104
-
The client can be configured to use a managed deploy by using the
105
-
`endpointBase` parameter. Since managed deploys do not rely on a `hostIdentifier`
106
-
, it can be omitted.
95
+
When using the [SaaS version available on swiftype.com](https://app.swiftype.com/as) of App Search, you can configure the client using your `hostIdentifier` instead of the `endpointBase` parameter.
96
+
The `hostIdentifier` can be found within the [Credentials](https://app.swiftype.com/ascredentials) menu.
| hostIdentifier | No | Your **Host Identifier**, should start with `host-`. Required unless explicitly setting `endpointBase`|
111
+
| searchKey | Yes | Your **Public Search Key**. It should start with `search-`. |
112
+
| engineName | Yes ||
113
+
| endpointBase | No | Overrides the base of the App Search API endpoint completely. Useful when proxying the App Search API, developing against a local server, or a Self-Managed or Cloud Deployment. Ex. "http://localhost:3002"|
114
+
| cacheResponses | No | Whether or not API responses should be cached. Default: `true`. |
115
+
| additionalHeaders | No | An Object with keys and values that will be converted to header names and values on all API requests
116
+
116
117
### API Methods
117
118
118
119
This client is a thin interface to the Elastic App Search API. Additional details for requests and responses can be
0 commit comments