diff --git a/integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java b/integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java index fdbbb0f6ba..680058d844 100644 --- a/integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java +++ b/integ-test/src/test/java/org/opensearch/sql/legacy/MethodQueryIT.java @@ -27,8 +27,12 @@ protected void init() throws Exception { } /** - * query 搜索就是 , lucene 原生的搜素方式 注意这个例子中value可以随便命名 "query" : - * {query_string" : {"query" : "address:880 Holmes Lane"} + * query + * "query" : { + * query_string" : { + * "query" : "address:880 Holmes Lane" + * } + * } * * @throws IOException */ @@ -43,8 +47,15 @@ public void queryTest() throws IOException { } /** - * matchQuery 是利用分词结果进行单个字段的搜索. "query" : { "match" : { "address" : - * {"query":"880 Holmes Lane", "type" : "boolean" } } } + * matchQuery + * "query" : { + * "match" : { + * "address" : { + * "query" : "880 Holmes Lane", + * "type" : "boolean" + * } + * } + * } * * @throws IOException */ @@ -58,11 +69,45 @@ public void matchQueryTest() throws IOException { } /** - * matchQuery 是利用分词结果进行单个字段的搜索. "query" : { "bool" : { "must" : { "bool" : { - * "should" : [ { "constant_score" : { "query" : { "match" : { "address" : { - * "query" : "Lane", "type" : "boolean" } } }, "boost" : 100.0 } }, { - * "constant_score" : { "query" : { "match" : { "address" : { "query" : - * "Street", "type" : "boolean" } } }, "boost" : 0.5 } } ] } } } } + * matchQuery + * { + * "query": { + * "bool": { + * "must": { + * "bool": { + * "should": [ + * { + * "constant_score": { + * "query": { + * "match": { + * "address": { + * "query": "Lane", + * "type": "boolean" + * } + * } + * }, + * "boost": 100 + * } + * }, + * { + * "constant_score": { + * "query": { + * "match": { + * "address": { + * "query": "Street", + * "type": "boolean" + * } + * } + * }, + * "boost": 0.5 + * } + * } + * ] + * } + * } + * } + * } + * } * * @throws IOException */ @@ -102,8 +147,13 @@ public void negativeRegexpQueryTest() throws IOException { } /** - * wildcardQuery 是用通配符的方式查找某个term  比如例子中 l*e means leae ltae .... - * "wildcard": { "address" : { "wildcard" : "l*e" } } + * wildcardQuery + * l*e means leae ltae ... + * "wildcard": { + * "address" : { + * "wildcard" : "l*e" + * } + * } * * @throws IOException */ @@ -117,10 +167,10 @@ public void wildcardQueryTest() throws IOException { } /** - * matchPhraseQueryTest 短语查询完全匹配. + * matchPhraseQuery * "address" : { - * "query" : "671 Bristol Street", - * "type" : "phrase" + * "query" : "671 Bristol Street", + * "type" : "phrase" * } * * @throws IOException