Skip to content

Commit

Permalink
Switch processor IT to use Lucene (opensearch-project#48)
Browse files Browse the repository at this point in the history
Updated processor test to use Lucene engine. Refactored ingest document
to refresh after ingestion and confirm doc gets indexed.

Signed-off-by: John Mazanec <[email protected]>
  • Loading branch information
jmazanec15 authored Nov 1, 2022
1 parent e30285b commit 0b8c0d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void testTextEmbeddingProcessor() throws Exception {
createPipelineProcessor(modelId, PIPELINE_NAME);
createTextEmbeddingIndex();
ingestDocument();
assertEquals(1, getDocCount(INDEX_NAME));
}

private String uploadTextEmbeddingModel() throws Exception {
Expand Down Expand Up @@ -64,7 +65,7 @@ private void ingestDocument() throws Exception {
Response response = makeRequest(
client(),
"POST",
INDEX_NAME + "/_doc",
INDEX_NAME + "/_doc?refresh",
null,
toHttpEntity(ingestDocument),
ImmutableList.of(new BasicHeader(HttpHeaders.USER_AGENT, "Kibana"))
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/processor/IndexMappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"method": {
"name": "hnsw",
"space_type": "l2",
"engine": "nmslib",
"engine": "lucene",
"parameters": {
"ef_construction": 128,
"m": 24
Expand All @@ -30,7 +30,7 @@
"method": {
"name": "hnsw",
"space_type": "l2",
"engine": "nmslib",
"engine": "lucene",
"parameters": {
"ef_construction": 128,
"m": 24
Expand All @@ -43,7 +43,7 @@
"method": {
"name": "hnsw",
"space_type": "l2",
"engine": "nmslib",
"engine": "lucene",
"parameters": {
"ef_construction": 128,
"m": 24
Expand All @@ -59,7 +59,7 @@
"method": {
"name": "hnsw",
"space_type": "l2",
"engine": "nmslib",
"engine": "lucene",
"parameters": {
"ef_construction": 128,
"m": 24
Expand Down

0 comments on commit 0b8c0d1

Please sign in to comment.