diff --git a/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java b/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java index 97d1c857c..4e4616c3d 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java @@ -72,7 +72,15 @@ private void ingestDocument() throws Exception { + " \"favorites\": {\n" + " \"game\": \"overwatch\",\n" + " \"movie\": null\n" - + " }\n" + + " },\n" + + " \"nested_passages\": [\n" + + " {\n" + + " \"text\": \"hello\"\n" + + " },\n" + + " {\n" + + " \"text\": \"world\"\n" + + " }\n" + + " ]\n" + "}\n"; Response response = makeRequest( client(), diff --git a/src/test/resources/processor/IndexMappings.json b/src/test/resources/processor/IndexMappings.json index 13faad6c4..ffa5cea64 100644 --- a/src/test/resources/processor/IndexMappings.json +++ b/src/test/resources/processor/IndexMappings.json @@ -83,6 +83,27 @@ }, "passage_text": { "type": "text" + }, + "nested_passages": { + "type": "nested", + "properties": { + "text": { + "type": "text" + }, + "embedding": { + "type": "knn_vector", + "dimension": 768, + "method": { + "name": "hnsw", + "space_type": "l2", + "engine": "lucene", + "parameters": { + "ef_construction": 128, + "m": 24 + } + } + } + } } } } diff --git a/src/test/resources/processor/PipelineConfiguration.json b/src/test/resources/processor/PipelineConfiguration.json index 471f6a432..d833576a0 100644 --- a/src/test/resources/processor/PipelineConfiguration.json +++ b/src/test/resources/processor/PipelineConfiguration.json @@ -10,6 +10,9 @@ "favorites": { "game": "game_knn", "movie": "movie_knn" + }, + "nested_passages": { + "text": "embedding" } } }