Skip to content

Commit

Permalink
Update semantic search documentation (#1952)
Browse files Browse the repository at this point in the history
* update semantic search setup documentation

* instructions to modify .env.local instead of .env.development

* fix typo
  • Loading branch information
ed-kung authored Mar 7, 2025
1 parent e269a8e commit 2c79472
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/dev/semantic-search.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Getting semantic search setup in OpenSearch is a multistep process.
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.

### step 1: configure the ml plugin
```json
Expand Down Expand Up @@ -67,7 +67,7 @@ PUT /_ingest/pipeline/nlp-ingest-pipeline
},
{
"text_embedding": {
"model_id": "6whlBY0B2sj1ObjeeD5d",
"model_id": "<model id>",
"field_map": {
"text": "text_embedding",
"title": "title_embedding"
Expand Down Expand Up @@ -306,3 +306,13 @@ GET /item-nlp/_search
}
```

### step 12: configure the development environment to use the nlp pipeline

Add the following lines to `.env.local`:

```
OPENSEARCH_INDEX=item-nlp
OPENSEARCH_MODEL_ID=<model id>
```

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 comments on commit 2c79472

Please sign in to comment.