Skip to content

Commit 2c79472

Browse files
authored
Update semantic search documentation (#1952)
* update semantic search setup documentation * instructions to modify .env.local instead of .env.development * fix typo
1 parent e269a8e commit 2c79472

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/dev/semantic-search.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Getting semantic search setup in OpenSearch is a multistep process.
1+
Getting semantic search setup in OpenSearch is currently a multistep, manual process. To configure semantic search, enter the following commands into OpenSearch's REST API. You can do this in Dev Tools in the OpenSearch Dashboard (after starting your SN dev environment, point your browser to localhost:5601). You can also use CURL to send these commands to localhost:9200.
22

33
### step 1: configure the ml plugin
44
```json
@@ -67,7 +67,7 @@ PUT /_ingest/pipeline/nlp-ingest-pipeline
6767
},
6868
{
6969
"text_embedding": {
70-
"model_id": "6whlBY0B2sj1ObjeeD5d",
70+
"model_id": "<model id>",
7171
"field_map": {
7272
"text": "text_embedding",
7373
"title": "title_embedding"
@@ -306,3 +306,13 @@ GET /item-nlp/_search
306306
}
307307
```
308308

309+
### step 12: configure the development environment to use the nlp pipeline
310+
311+
Add the following lines to `.env.local`:
312+
313+
```
314+
OPENSEARCH_INDEX=item-nlp
315+
OPENSEARCH_MODEL_ID=<model id>
316+
```
317+
318+
Note that you won't have to re-do the above steps each time you restart your dev instance. The OpenSearch configuration is saved to a local volume.

0 commit comments

Comments
 (0)