Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws committed Mar 7, 2024
1 parent a99beda commit 33e4a2b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public void testDocumentChunkingProcessor_withFixedTokenLength_successful() thro

List<String> expectedPassages = new ArrayList<>();
expectedPassages.add("This is an example document to be chunked The document");
expectedPassages.add("The document contains a single paragraph two sentences and 24");
expectedPassages.add("and 24 tokens by standard tokenizer in OpenSearch");
expectedPassages.add("contains a single paragraph two sentences and 24 tokens by");
expectedPassages.add("standard tokenizer in OpenSearch");
validateIndexIngestResults(INDEX_NAME, OUTPUT_FIELD, expectedPassages);
} finally {
wipeOfTestResources(INDEX_NAME, FIXED_TOKEN_LENGTH_PIPELINE_NAME, null, null);
Expand Down Expand Up @@ -112,7 +112,7 @@ public void testDocumentChunkingProcessor_withCascade_successful() throws Except
// " ", "." and "," will not be included in fixed token length output
expectedPassages.add("This is an example document to be chunked");
expectedPassages.add("The document contains a single paragraph two sentences and 24");
expectedPassages.add("and 24 tokens by standard tokenizer in OpenSearch");
expectedPassages.add("tokens by standard tokenizer in OpenSearch");
validateIndexIngestResults(INDEX_NAME, OUTPUT_FIELD, expectedPassages);

expectedPassages.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
{
"chunking": {
"field_map": {
"body": {
"delimiter": {
"delimiter": "."
},
"output_field": "body_chunk_intermediate"
"body": "body_chunk_intermediate"
},
"algorithm": {
"delimiter": {
"delimiter": "."
}
}
}
},
{
"chunking": {
"field_map": {
"body_chunk_intermediate": {
"fix_length": {
"token_limit": 10
},
"output_field": "body_chunk"
"body_chunk_intermediate": "body_chunk"
},
"algorithm": {
"fix_length": {
"token_limit": 10
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"chunking": {
"field_map": {
"body": {
"delimiter": {
"delimiter": "."
},
"output_field": "body_chunk"
"body": "body_chunk"
},
"algorithm": {
"delimiter": {
"delimiter": "."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"chunking": {
"field_map": {
"body": {
"fix_length": {
"token_limit": 10
},
"output_field": "body_chunk"
"body": "body_chunk"
},
"algorithm": {
"fix_length": {
"token_limit": 10
}
}
}
Expand Down

0 comments on commit 33e4a2b

Please sign in to comment.