Skip to content

Commit

Permalink
Remove non-English comments from ITs.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
  • Loading branch information
Yury-Fridlyand committed Mar 8, 2023
1 parent e21269a commit 97ba941
Showing 1 changed file with 64 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
Expand Down

0 comments on commit 97ba941

Please sign in to comment.