From 2c79472c691a7baa7f00d858d50c5ee7b7610641 Mon Sep 17 00:00:00 2001 From: Edward Kung Date: Fri, 7 Mar 2025 13:46:34 -0800 Subject: [PATCH] Update semantic search documentation (#1952) * update semantic search setup documentation * instructions to modify .env.local instead of .env.development * fix typo --- docs/dev/semantic-search.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/dev/semantic-search.md b/docs/dev/semantic-search.md index 70b98d236..29d2d0b1d 100644 --- a/docs/dev/semantic-search.md +++ b/docs/dev/semantic-search.md @@ -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 @@ -67,7 +67,7 @@ PUT /_ingest/pipeline/nlp-ingest-pipeline }, { "text_embedding": { - "model_id": "6whlBY0B2sj1ObjeeD5d", + "model_id": "", "field_map": { "text": "text_embedding", "title": "title_embedding" @@ -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= +``` + +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.