Skip to content
This repository was archived by the owner on Sep 1, 2021. It is now read-only.

Commit 4f7b279

Browse files
authored
Updating readme (#21)
Emphasize on SMAS instead of SaaS in the doc.
1 parent c498181 commit 4f7b279

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,44 @@ To guarantee compatibility, use the most recent version of this library within t
4545

4646
For example, for App Search `7.3`, use `7.3` of this library or above, but not `8.0`.
4747

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.
4949

5050
## Usage
5151

5252
### Instantiating a client
5353

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.
6055

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:
6457

6558
```python
6659
>>> from elastic_app_search import Client
6760
>>> client = Client(
68-
api_key='private-mu75psc5egt9ppzuycnc2mc3',
6961
base_endpoint='localhost:3002/api/as/v1',
62+
api_key='private-mu75psc5egt9ppzuycnc2mc3',
7063
use_https=False
7164
)
7265
```
7366

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+
7486
### Indexing: Creating or Updating a Single Document
7587

7688
```python

0 commit comments

Comments
 (0)