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
{{ message }}
This repository was archived by the owner on Sep 1, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+23-11Lines changed: 23 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -45,32 +45,44 @@ To guarantee compatibility, use the most recent version of this library within t
45
45
46
46
For example, for App Search `7.3`, use `7.3` of this library or above, but not `8.0`.
47
47
48
-
If you are a [SaaS](https://app.swiftype.com/as)user, simply use the most recent version of this library.
48
+
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.
49
49
50
50
## Usage
51
51
52
52
### Instantiating a client
53
53
54
-
```python
55
-
>>>from elastic_app_search import Client
56
-
>>> host_identifier ='host-c5s2mj'
57
-
>>> api_key ='private-mu75psc5egt9ppzuycnc2mc3'
58
-
>>> client = Client(host_identifier, api_key)
59
-
```
54
+
Using this client assumes that you have already an instance of [Elastic App Search](https://www.elastic.co/products/app-search) up and running.
60
55
61
-
### Using with App Search Managed Deploys
62
-
63
-
The client can be configured to use a managed deploy by adjusting the `base_endpoint` and `use_https` parameters. Since managed deploys do not rely on a `host_identifier`, it can be omitted.
56
+
The client can be instantiated using the `base_endpoint`, `api_key` and `use_https` parameters:
64
57
65
58
```python
66
59
>>>from elastic_app_search import Client
67
60
>>> client = Client(
68
-
api_key='private-mu75psc5egt9ppzuycnc2mc3',
69
61
base_endpoint='localhost:3002/api/as/v1',
62
+
api_key='private-mu75psc5egt9ppzuycnc2mc3',
70
63
use_https=False
71
64
)
72
65
```
73
66
67
+
Note:
68
+
69
+
The `[api_key]` authenticates requests to the API.
70
+
You can use any key type with the client, however each has a different scope.
71
+
For more information on keys, check out the [documentation](https://swiftype.com/documentation/app-search/credentials).
72
+
73
+
#### Swiftype.com App Search users:
74
+
75
+
When using the [SaaS version available on swiftype.com](https://app.swiftype.com/as) of App Search, you can configure the client using your `host_identifier` instead of the `base_endpoint` parameter.
76
+
The `host_identifier` can be found within the [Credentials](https://app.swiftype.com/ascredentials) menu.
77
+
78
+
```python
79
+
>>>from elastic_app_search import Client
80
+
>>> host_identifier ='host-c5s2mj'
81
+
>>> api_key ='private-mu75psc5egt9ppzuycnc2mc3'
82
+
>>> client = Client(host_identifier, api_key)
83
+
```
84
+
85
+
74
86
### Indexing: Creating or Updating a Single Document
0 commit comments