Skip to content

Commit a42f196

Browse files
committed
Update README to be dataset aligned
1 parent 337fb3c commit a42f196

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,32 +67,53 @@ For a more detailed example with test data, please refer to the Confluence docum
6767

6868
### Index records into local OpenSearch Docker container
6969

70-
1. Follow the instructions in either [Running Opensearch locally with Docker](#running-opensearch-locally-with-docker) or [Running Opensearch and OpenSearch Dashboards locally with Docker](#running-opensearch-and-opensearch-dashboards-locally-with-docker).
70+
This CLI provides a couple of ways to index records into a local Opensearch instance:
7171

72-
2. Open a new terminal, and create a new index. Copy the name of the created index printed to the terminal's output.
72+
1. A step-by-step approach that mirrors the actions in the TIMDEX ETL StepFunction
73+
2. A single, convenience command that fully reindexes a source
74+
75+
For both, first follow the instructions in either [Running Opensearch locally with Docker](#running-opensearch-locally-with-docker) or [Running Opensearch and OpenSearch Dashboards locally with Docker](#running-opensearch-and-opensearch-dashboards-locally-with-docker), and then open a new terminal for the following commands.
76+
77+
#### Option 1: Step-by-Step Bulk Index
78+
79+
1. Create a new index. Copy the name of the created index printed to the terminal's output.
7380

7481
```shell
7582
pipenv run tim create -s <source-name>
7683
```
7784

78-
3. Copy the index name and promote the index to the alias.
85+
2. Copy the index name and promote the index to the alias.
7986

8087
```shell
8188
pipenv run tim promote -a <source-name> -i <index-name>
8289
```
8390

84-
4. Bulk index records from a specified directory (e.g., including S3).
91+
3. Bulk index records from a TIMDEX dataset (can be local or from S3).
8592

8693
```shell
87-
pipenv run tim bulk-index -s <source-name> <filepath-to-records>
94+
pipenv run tim bulk-index \
95+
--source <source-name> \
96+
--run-id <run-id> \
97+
--run-date <YYYY-MM-DD-run-date> \
98+
<dataset-location>
8899
```
89100

90-
5. After verifying that the bulk-index was successful, clean up your local OpenSearch instance by deleting the index.
101+
4. After verifying that the bulk-index was successful, clean up your local OpenSearch instance by deleting the index.
91102

92103
```shell
93104
pipenv run tim delete -i <index-name>
94105
```
95106

107+
#### Option 2: Fully Reindex a Source
108+
109+
1. Utilize the CLI command `reindex-source`:
110+
111+
```shell
112+
pipenv run tim --verbose reindex-source \
113+
--source <source-name> \
114+
<dataset-location>
115+
```
116+
96117
### Running OpenSearch on AWS
97118

98119
1. Ensure that you have the correct AWS credentials set for the Dev1 (or desired) account.

0 commit comments

Comments
 (0)