Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update semantic search documentation #1952

Merged
merged 3 commits into from
Mar 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.