Skip to content

Commit

Permalink
add integration test for list of nested objects
Browse files Browse the repository at this point in the history
Signed-off-by: krishy91 <crgkc.r@gmail.com>
  • Loading branch information
krishy91 committed Feb 26, 2024
1 parent a006c25 commit 54419ea
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
21 changes: 21 additions & 0 deletions src/test/resources/processor/IndexMappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/processor/PipelineConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"favorites": {
"game": "game_knn",
"movie": "movie_knn"
},
"nested_passages": {
"text": "embedding"
}
}
}
Expand Down

0 comments on commit 54419ea

Please sign in to comment.