-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
644 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# OpenSearch | ||
|
||
* Driver work with OpenSearch through [OpenSearch REST API](https://opensearch.org/docs/latest/getting-started/communicate/#opensearch-rest-api) | ||
* Migrations are written in JSON format and support actions such as creating indices, updating mappings, modifying settings and etc. | ||
* [Examples](./examples) | ||
|
||
# Usage | ||
|
||
`opensearch://user:password@host:port/index` | ||
|
||
| URL Query | Default value | Description | | ||
|------------|---------------------|-------------| | ||
| `index` | `.migrations` | Name of the migrations index | | ||
| `timeout` | `60s` | The max time that an operation will wait before failing. | | ||
| `user` | | The user to sign in as. Can be omitted | | ||
| `password` | | The user's password. Can be omitted | | ||
| `host` | | The host to connect to | | ||
| `port` | | The port to bind to | |
4 changes: 4 additions & 0 deletions
4
database/opensearch/examples/migrations/1_create_index.down.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"action": "DELETE /test-index", | ||
"body": {} | ||
} |
16 changes: 16 additions & 0 deletions
16
database/opensearch/examples/migrations/1_create_index.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"action": "PUT /test-index", | ||
"body": { | ||
"settings": { | ||
"number_of_shards": 1, | ||
"number_of_replicas": 0 | ||
}, | ||
"mappings": { | ||
"properties": { | ||
"title": { | ||
"type": "text" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.