From 412ba1daaf0124bcdfd2fbaff498c8586f3562ea Mon Sep 17 00:00:00 2001 From: MitchellGale-BitQuill Date: Mon, 28 Nov 2022 13:56:30 -0800 Subject: [PATCH] Fixed issue with data duplication. Signed-off-by: MitchellGale-BitQuill --- .../src/test/java/org/opensearch/sql/sql/TextTypeIT.java | 4 ++-- integ-test/src/test/resources/text_keyword_index.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integ-test/src/test/java/org/opensearch/sql/sql/TextTypeIT.java b/integ-test/src/test/java/org/opensearch/sql/sql/TextTypeIT.java index c075f8591d..ba3ab19fe8 100644 --- a/integ-test/src/test/java/org/opensearch/sql/sql/TextTypeIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/sql/TextTypeIT.java @@ -156,7 +156,7 @@ public void selectPositionKeyword() { @Test public void selectPositionText() { - executeJdbcRequest(String.format("select POSITION(text IN typeText) from %s", TEST_INDEX_TEXTKEYWORD)); + executeJdbcRequest(String.format("select POSITION(\\\"text\\\" IN typeText) from %s", TEST_INDEX_TEXTKEYWORD)); } @Test @@ -166,7 +166,7 @@ public void selectPositionTextKeywordFieldNoFieldData() { @Test public void selectPositionTypeTextFieldData() { - executeJdbcRequest(String.format("select POSITION(keyFD IN typeTextFieldData) from %s", TEST_INDEX_TEXTKEYWORD)); + executeJdbcRequest(String.format("select POSITION(\\\"keyFD\\\" IN typeTextFieldData) from %s", TEST_INDEX_TEXTKEYWORD)); } @Test diff --git a/integ-test/src/test/resources/text_keyword_index.json b/integ-test/src/test/resources/text_keyword_index.json index d09dfd01e2..b9cb83d438 100644 --- a/integ-test/src/test/resources/text_keyword_index.json +++ b/integ-test/src/test/resources/text_keyword_index.json @@ -1,7 +1,7 @@ {"index": {"_id":"1"}} {"typeKeyword": "key00", "typeText": "text00", "typeKeywordFieldNoFieldData": "keyword00","typeTextFieldData": "keyFD00", "typeKeywordFieldData": "textFD00", "textDataFieldNoFields": "textFDNF00","int0": 0} {"index": {"_id":"2"}} -{"typeKeyword": "key01", "typeText": "text01", "typeKeywordFieldNoFieldData": "keyword01", "typeTextFieldData": "keyFD01", "typeTextFieldData": "textFD01OverTen", "textDataFieldNoFields": "textFDNF01", "int0": 1} +{"typeKeyword": "key01", "typeText": "text01", "typeKeywordFieldNoFieldData": "keyword01", "typeTextFieldData": "keyFD01", "typeKeywordFieldData": "textFD01OverTen", "textDataFieldNoFields": "textFDNF01", "int0": 1} {"index": {"_id":"3"}} {"typeKeyword": "key02", "typeText": "text02", "typeKeywordFieldNoFieldData": "keyword02", "typeTextFieldData": "keyFD02", "typeKeywordFieldData": "textFD02", "textDataFieldNoFields": "textFDNF02", "int0": 2} {"index": {"_id":"4"}}