{"id":4257,"date":"2024-04-14T17:24:11","date_gmt":"2024-04-14T09:24:11","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-boot%e6%95%b4%e5%90%88elasticsearch\/"},"modified":"2024-04-14T17:24:11","modified_gmt":"2024-04-14T09:24:11","slug":"spring-boot%e6%95%b4%e5%90%88elasticsearch","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-boot%e6%95%b4%e5%90%88elasticsearch\/","title":{"rendered":"Spring Boot\u6574\u5408Elasticsearch"},"content":{"rendered":"<div class='wxsyncmain'>\n<h1 cid=\"n0\" mdtype=\"heading\" style=\"margin-top: 1rem;margin-bottom: 1rem;padding-bottom: 0.3em;outline: 0px;font-weight: bold;letter-spacing: 0.544px;white-space: pre-wrap;color: rgb(34, 34, 34);background-color: rgb(255, 255, 255);line-height: 1.2;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);width: inherit;font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;text-align: start;visibility: visible;\"><span style=\"outline: 0px;color: rgb(178, 178, 178);visibility: visible;\">\u5982\u679c\u6587\u7ae0\u4e2d\u4ee3\u7801\u4e0d\u4fbf\u4e8e\u9605\u8bfb\uff0c\u8bf7\u4f7f\u7528\u7535\u8111\u67e5\u770b\u6216\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u3002\u6e90\u7801\u8be6\u89c1\uff1a<\/span><\/h1>\n<p style=\"outline: 0px;font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;letter-spacing: 0.544px;text-wrap: wrap;background-color: rgb(255, 255, 255);visibility: visible;\"><span style=\"outline: 0px;color: rgb(178, 178, 178);visibility: visible;\"><span style=\"outline: 0px;font-weight: 700;color: rgb(77, 77, 77);font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif;font-size: 16px;font-variant-ligatures: no-common-ligatures;letter-spacing: normal;text-align: start;visibility: visible;\">GitHub\uff1ahttps:\/\/github.com\/dkbnull\/SpringBootDemo<\/span><span style=\"outline: 0px;font-weight: 700;color: rgb(77, 77, 77);font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif;font-size: 16px;font-variant-ligatures: no-common-ligatures;letter-spacing: normal;text-align: start;visibility: visible;\">Gitee\uff1ahttps:\/\/gitee.com\/dkbnull\/SpringBootDemo<\/span><\/span><\/p>\n<h1 cid=\"n0\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">0 \u5f00\u53d1\u73af\u5883<\/span><\/h1>\n<ul class=\"list-paddingleft-1\" cid=\"n2\" mdtype=\"list\" data-mark=\"-\" style=\"margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;text-wrap: wrap;\">\n<li>\n<p cid=\"n4\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">JDK\uff1a1.8<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n6\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">Spring Boot\uff1a2.7.18<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n8\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">Elasticsearch\uff1a7.17.18<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n10\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">Kibana\uff1a7.17.18<\/span><\/p>\n<\/li>\n<li>\n<p cid=\"n12\" mdtype=\"paragraph\" style=\"orphans: 4;margin-bottom: 0.5rem;white-space-collapse: preserve;\"><span md-inline=\"plain\">elasticsearch-head\uff1a5.0.0<\/span><\/p>\n<\/li>\n<\/ul>\n<h1 cid=\"n13\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1 \u5b89\u88c5\u670d\u52a1<\/span><\/h1>\n<h2 cid=\"n14\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1.1 \u5b89\u88c5Elasticsearch<\/span><\/h2>\n<p cid=\"n15\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e0b\u8f7d\u5730\u5740\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/www.elastic.co\/cn\/downloads\/past-releases\/elasticsearch-7-17-18<\/span><\/span><\/p>\n<p cid=\"n16\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e0b\u8f7d\u89e3\u538b\u540e\u53cc\u51fb <\/span><span md-inline=\"strong\"><strong>binelasticsearch.bat<\/strong><\/span><span md-inline=\"plain\"> \u5373\u53ef\u8fd0\u884c<\/span><\/p>\n<p cid=\"n17\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6ce8\u610f\uff1a<\/span><span md-inline=\"strong\"><strong>\u89e3\u538b\u540e\u8def\u5f84\u4e2d\u4e0d\u80fd\u6709\u7a7a\u683c\uff0c\u793a\u4f8b D:Programselasticsearch<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000608\" data-ratio=\"0.5226586102719033\" data-s=\"300,640\"  data-type=\"png\" data-w=\"993\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152107428.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000608\" data-ratio=\"0.5226586102719033\" data-s=\"300,640\"  data-type=\"png\" data-w=\"993\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152107428.png\"  \/><\/noscript><\/p>\n<p cid=\"n19\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4f\u89c8\u5668\u8bbf\u95ee <\/span><span md-inline=\"strong\"><strong>127.0.0.1:9200<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000607\" data-ratio=\"0.7955555555555556\" data-s=\"300,640\"  data-type=\"png\" data-w=\"450\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152111992.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000607\" data-ratio=\"0.7955555555555556\" data-s=\"300,640\"  data-type=\"png\" data-w=\"450\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152111992.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n21\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1.2 \u5b89\u88c5Kibana<\/span><\/h2>\n<p cid=\"n22\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"em\"><em>\u672c\u6559\u7a0b\u4e2d\u975e\u5fc5\u987b<\/em><\/span><\/p>\n<p cid=\"n23\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e0b\u8f7d\u5730\u5740\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/www.elastic.co\/cn\/downloads\/past-releases\/kibana-7-17-18<\/span><\/span><\/p>\n<p cid=\"n24\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e00\u4e2a\u9488\u5bf9es\u7684\u5f00\u6e90\u5206\u6790\u53ca\u53ef\u89c6\u5316\u5e73\u53f0\uff0c\u7528\u4e8e\u641c\u7d22\u3001\u67e5\u770b\u4ea4\u4e92\u5b58\u50a8\u5728es\u7d22\u5f15\u4e2d\u7684\u6570\u636e\u3002<\/span><\/p>\n<p cid=\"n25\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e0b\u8f7d\u89e3\u538b\u540e\u53cc\u51fb <\/span><span md-inline=\"strong\"><strong>binkibana.bat<\/strong><\/span><span md-inline=\"plain\"> \u5373\u53ef\u8fd0\u884c<\/span><\/p>\n<p cid=\"n26\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6ce8\u610f\uff1a<\/span><span md-inline=\"strong\"><strong>\u8981\u4e0ees\u7248\u672c\u4e00\u81f4\uff0c\u89e3\u538b\u540e\u8def\u5f84\u4e2d\u4e0d\u80fd\u6709\u7a7a\u683c<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000609\" data-ratio=\"0.5226586102719033\" data-s=\"300,640\"  data-type=\"png\" data-w=\"993\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152112622.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000609\" data-ratio=\"0.5226586102719033\" data-s=\"300,640\"  data-type=\"png\" data-w=\"993\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152112622.png\"  \/><\/noscript><\/p>\n<p cid=\"n28\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4f\u89c8\u5668\u8bbf\u95ee <\/span><span md-inline=\"strong\"><strong>127.0.0.1:5601<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000611\" data-ratio=\"0.9022346368715084\" data-s=\"300,640\"  data-type=\"png\" data-w=\"716\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152117257.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000611\" data-ratio=\"0.9022346368715084\" data-s=\"300,640\"  data-type=\"png\" data-w=\"716\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152117257.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n30\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">1.3 \u5b89\u88c5elasticsearch-head<\/span><\/h2>\n<p cid=\"n31\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"em\"><em>\u672c\u6559\u7a0b\u4e2d\u975e\u5fc5\u987b<\/em><\/span><\/p>\n<p cid=\"n32\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u4e0b\u8f7d\u5730\u5740\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/github.com\/mobz\/elasticsearch-head\/releases<\/span><\/span><\/p>\n<p cid=\"n138\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u542f\u52a8\uff0c\u547d\u4ee4\u884c\u6267\u884c<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"bat\" cid=\"n34\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">npm install<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">npm run <span style=\"color: rgb(51, 0, 170);\">start<\/span><\/span><\/pre>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000614\" data-ratio=\"0.5226586102719033\" data-s=\"300,640\"  data-type=\"png\" data-w=\"993\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152118709.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000614\" data-ratio=\"0.5226586102719033\" data-s=\"300,640\"  data-type=\"png\" data-w=\"993\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152118709.png\"  \/><\/noscript><\/p>\n<p cid=\"n36\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4f\u89c8\u5668\u8bbf\u95ee <\/span><span md-inline=\"strong\"><strong>127.0.0.1:9100<\/strong><\/span><\/p>\n<p cid=\"n37\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u56e0\u4e3a\u5b58\u5728\u8de8\u57df\u95ee\u9898\uff0c\u8fde\u63a5es\u5931\u8d25<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000606\" data-ratio=\"0.2\" data-s=\"300,640\"  data-type=\"png\" data-w=\"775\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152120153.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000606\" data-ratio=\"0.2\" data-s=\"300,640\"  data-type=\"png\" data-w=\"775\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152120153.png\"  \/><\/noscript><\/p>\n<p cid=\"n39\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"strong\"><strong><span md-inline=\"highlight\"><mark style=\"background: rgb(255, 255, 0);color: rgb(0, 0, 0);\"><span md-inline=\"plain\">\u4fee\u6539elasticsearch\u914d\u7f6e<\/span><\/mark><\/span><\/strong><\/span><span md-inline=\"plain\">\uff0c<\/span><span md-inline=\"strong\"><strong>elasticsearchconfigelasticsearch.yml<\/strong><\/span><span md-inline=\"plain\">\uff0c\u589e\u52a0\u652f\u6301\u8de8\u57df<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"yml\" cid=\"n40\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">http.cors.enabled<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(119, 0, 136);\">true<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(34, 17, 153);\">http.cors.allow-origin<\/span><span style=\"color: rgb(85, 85, 85);\">: <\/span><span style=\"color: rgb(170, 17, 17);\">\"*\"<\/span><\/span><\/pre>\n<p cid=\"n41\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u91cd\u542felasticsearch\u3001elasticsearch-head\uff0c\u5237\u65b0\u9875\u9762\uff0c\u8fde\u63a5\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000612\" data-ratio=\"0.12240437158469945\" data-s=\"300,640\"  data-type=\"png\" data-w=\"915\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152121236.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000612\" data-ratio=\"0.12240437158469945\" data-s=\"300,640\"  data-type=\"png\" data-w=\"915\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152121236.png\"  \/><\/noscript><\/p>\n<h1 cid=\"n43\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">2 \u5f15\u5165\u4f9d\u8d56<\/span><\/h1>\n<pre spellcheck=\"false\" lang=\"xml\" cid=\"n44\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>org.springframework.boot<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>spring-boot-starter-data-elasticsearch<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">&lt;!--  https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/client\/java-api-client\/7.17\/installation.html#class-not-found-jsonprovider   --&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">&lt;!--  It may happen that after setting up the dependencies, your application fails with ClassNotFoundException: jakarta.json.spi.JsonProvider.   --&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">&lt;!--  If this happens, you have to explicitly add the jakarta.json:jakarta.json-api:2.0.1 dependency.   --&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>jakarta.json<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>jakarta.json-api<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">version<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>2.0.1<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">version<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(170, 85, 0);\">&lt;!--  lombok\uff0c\u6d4b\u8bd5\u7528   --&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>org.projectlombok<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">groupId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>lombok<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">artifactId<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">version<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>1.18.30<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">version<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">scope<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>provided<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">scope<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">dependency<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><\/pre>\n<p cid=\"n45\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5f15\u5165\u6210\u529f\u540e\uff0c\u8fd9\u91cc\u6ce8\u610f\u68c0\u67e5\u5f15\u5165\u7684jar\u5305\u7248\u672c\u53f7\uff0c\u5c3d\u91cf\u4fdd\u8bc1\u4e0eelasticsearch\u7248\u672c\u53f7\u4e00\u81f4\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u83ab\u540d\u5947\u602a\u7684\u95ee\u9898<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000605\" data-ratio=\"0.47832585949177875\" data-s=\"300,640\"  data-type=\"png\" data-w=\"669\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152123992.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000605\" data-ratio=\"0.47832585949177875\" data-s=\"300,640\"  data-type=\"png\" data-w=\"669\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152123992.png\"  \/><\/noscript><\/p>\n<p cid=\"n47\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5982\u56fe\u6240\u793a\uff0c\u7a0b\u5e8f\u5f15\u5165\u7684\u662f7.17.15\uff0c\u4f46\u662f\u6211\u4eec\u4f7f\u7528\u7684elasticsearch\u7248\u672c\u662f7.17.18\uff0c\u6240\u4ee5\u8fd9\u91cc\u505a\u4e0b\u4fee\u6539<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"xml\" cid=\"n48\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">properties<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">maven.compiler.source<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>8<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">maven.compiler.source<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">maven.compiler.target<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>8<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">maven.compiler.target<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">project.build.sourceEncoding<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>UTF-8<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">project.build.sourceEncoding<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(17, 119, 0);\">&lt;<\/span><span style=\"color: rgb(17, 119, 0);\">elasticsearch.version<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span>7.17.18<span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">elasticsearch.version<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(17, 119, 0);\">&lt;\/<\/span><span style=\"color: rgb(17, 119, 0);\">properties<\/span><span style=\"color: rgb(17, 119, 0);\">&gt;<\/span><\/span><\/pre>\n<h1 cid=\"n49\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">3 \u65b0\u5efa\u914d\u7f6e\u6587\u4ef6<\/span><\/h1>\n<p cid=\"n50\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u53c2\u8003\u6587\u6863\uff1a<\/span><\/p>\n<p cid=\"n51\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"link\"><span md-inline=\"plain\">Java High Level REST Client\uff1a<span style=\"color: rgb(91, 128, 141);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;orphans: 4;text-align: start;white-space: pre-wrap;background-color: rgb(255, 255, 255);text-decoration: underline;\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/client\/java-rest\/7.17\/java-rest-high.html<\/span><\/span><\/span><\/p>\n<p cid=\"n52\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"link\"><span md-inline=\"plain\">Elasticsearch Java API Client\uff1a<span style=\"color: rgb(91, 128, 141);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;orphans: 4;text-align: start;white-space: pre-wrap;background-color: rgb(255, 255, 255);text-decoration: underline;\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/client\/java-api-client\/7.17\/introduction.html<\/span><\/span><\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n53\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Configuration<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">EsClientConfig<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Bean<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>() {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">RestClient<\/span> <span style=\"color: rgb(0, 0, 0);\">restClient<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">RestClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">builder<\/span>(<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">        <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">HttpHost<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"localhost\"<\/span>, <span style=\"color: rgb(17, 102, 68);\">9200<\/span>)).<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">ElasticsearchTransport<\/span> <span style=\"color: rgb(0, 0, 0);\">transport<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">RestClientTransport<\/span>(<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">        <span style=\"color: rgb(0, 0, 0);\">restClient<\/span>, <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">JacksonJsonpMapper<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">return<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span>(<span style=\"color: rgb(0, 0, 0);\">transport<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h1 cid=\"n54\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4 \u6d4b\u8bd5<\/span><\/h1>\n<h2 cid=\"n55\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.1 \u542f\u52a8elasticsearch<\/span><\/h2>\n<h2 cid=\"n56\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.2 \u542f\u52a8elasticsearch-head<\/span><\/h2>\n<p cid=\"n57\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u975e\u5fc5\u987b\uff0c\u53ef\u89c6\u5316\u754c\u9762\uff0c\u65b9\u4fbf\u67e5\u770b<\/span><\/p>\n<h2 cid=\"n58\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.3 \u65b0\u5efa\u6d4b\u8bd5\u7c7b - \u521b\u5efa\u7d22\u5f15<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n59\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoads<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u521b\u5efa\u7d22\u5f15<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">CreateIndexRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">index<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">CreateIndexRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6267\u884c\uff0c\u83b7\u5f97\u54cd\u5e94<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">CreateIndexResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">indices<\/span>().<span style=\"color: rgb(0, 0, 0);\">create<\/span>(<span style=\"color: rgb(0, 0, 0);\">index<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n60\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u65b9\u6cd5\u6210\u529f\u8fd0\u884c\uff0c\u6210\u529f\u6253\u5370\u521b\u5efa\u7684\u7d22\u5f15\u4fe1\u606f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000604\" data-ratio=\"0.2600652883569097\" data-s=\"300,640\"  data-type=\"png\" data-w=\"919\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152124611.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000604\" data-ratio=\"0.2600652883569097\" data-s=\"300,640\"  data-type=\"png\" data-w=\"919\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152124611.png\"  \/><\/noscript><\/p>\n<p cid=\"n62\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u67e5\u770belasticsearch-head\uff0c\u7d22\u5f15\u521b\u5efa\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000610\" data-ratio=\"0.6370716510903427\" data-s=\"300,640\"  data-type=\"png\" data-w=\"642\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152126281.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000610\" data-ratio=\"0.6370716510903427\" data-s=\"300,640\"  data-type=\"png\" data-w=\"642\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152126281.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n64\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">4.4 \u8c03\u6574\u6d4b\u8bd5\u7c7b - \u67e5\u8be2\u7d22\u5f15<\/span><\/h2>\n<p cid=\"n65\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6211\u4eec\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4ee3\u7801\u83b7\u53d6\u7d22\u5f15\u4fe1\u606f<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n66\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsGet<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">GetIndexRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">index<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">GetIndexRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">GetIndexResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">indices<\/span>().<span style=\"color: rgb(0, 0, 0);\">get<\/span>(<span style=\"color: rgb(0, 0, 0);\">index<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n67\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fd0\u884c\uff0c\u6210\u529f\u6253\u5370\u67e5\u8be2\u7684\u7d22\u5f15\u4fe1\u606f<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n68\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">GetIndexResponse: {\"test_index\":{\"aliases\":{},\"mappings\":{},\"settings\":{\"index\":{\"number_of_shards\":\"1\",\"number_of_replicas\":\"1\",\"routing\":{\"allocation\":{\"include\":{\"_tier_preference\":\"data_content\"}}},\"provided_name\":\"test_index\",\"creation_date\":\"1712489702602\",\"uuid\":\"J4kqrjj2TBCHamBa8iMoYA\",\"version\":{\"created\":\"7171899\"}}}}}<\/span><\/pre>\n<h1 cid=\"n69\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">5 \u65b0\u5efa\u5b9e\u4f53\u7c7b<\/span><\/h1>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n70\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Data<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@AllArgsConstructor<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@NoArgsConstructor<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@Component<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">UserModel<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">username<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 136, 85);\">String<\/span> <span style=\"color: rgb(0, 0, 0);\">password<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<h1 cid=\"n71\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6 \u6d4b\u8bd5<\/span><\/h1>\n<h2 cid=\"n72\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.1 \u521b\u5efa\u6587\u6863<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n73\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsAdd<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span> <span style=\"color: rgb(0, 0, 0);\">userModel<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e09\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"zhangsan\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u521b\u5efa\u8bf7\u6c42<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">IndexRequest<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">IndexRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">id<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Time<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">time<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1s\"<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">document<\/span>(<span style=\"color: rgb(0, 0, 0);\">userModel<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u53d1\u9001\u8bf7\u6c42\uff0c\u83b7\u53d6\u54cd\u5e94\u7ed3\u679c<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">IndexResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n74\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fd0\u884c\uff0c\u6210\u529f\u521b\u5efa\u6587\u6863\uff0c\u6253\u5370\u4fe1\u606f\u5982\u4e0b<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n75\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">IndexResponse: {\"_id\":\"1\",\"_index\":\"test_index\",\"_primary_term\":1,\"result\":\"created\",\"_seq_no\":0,\"_shards\":{\"failed\":0.0,\"successful\":1.0,\"total\":2.0},\"_type\":\"_doc\",\"_version\":1}<\/span><\/pre>\n<p cid=\"n76\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u67e5\u770belasticsearch-head\uff0c\u6587\u6863\u521b\u5efa\u6210\u529f\uff0c\u80fd\u591f\u6210\u529f\u67e5\u8be2\u5230<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000613\" data-ratio=\"0.4640820980615735\" data-s=\"300,640\"  data-type=\"png\" data-w=\"877\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152128502.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000613\" data-ratio=\"0.4640820980615735\" data-s=\"300,640\"  data-type=\"png\" data-w=\"877\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152128502.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n78\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.2 \u67e5\u8be2\u6587\u6863<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n79\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsGetDoc<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u68c0\u67e5\u6587\u6863\u662f\u5426\u5b58\u5728<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">ExistsRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">ExistsRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">id<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">BooleanResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">exists<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">exists<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"BooleanResponse: \"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">exists<\/span>.<span style=\"color: rgb(0, 0, 0);\">value<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">if<\/span> (<span style=\"color: rgb(152, 26, 26);\">!<\/span><span style=\"color: rgb(0, 0, 0);\">exists<\/span>.<span style=\"color: rgb(0, 0, 0);\">value<\/span>()) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(119, 0, 136);\">return<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u82e5\u5b58\u5728\uff0c\u5219\u83b7\u53d6\u6587\u6863\u4fe1\u606f<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">GetRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">requestGet<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">GetRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">id<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">GetResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;?<\/span> <span style=\"color: rgb(119, 0, 136);\">extends<\/span> <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">responseGet<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">get<\/span>(<span style=\"color: rgb(0, 0, 0);\">requestGet<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">responseGet<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">ObjectMapper<\/span> <span style=\"color: rgb(0, 0, 0);\">mapper<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">ObjectMapper<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">mapper<\/span>.<span style=\"color: rgb(0, 0, 0);\">writeValueAsString<\/span>(<span style=\"color: rgb(0, 0, 0);\">responseGet<\/span>.<span style=\"color: rgb(0, 0, 0);\">source<\/span>()));<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n80\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fd0\u884c\uff0c\u6210\u529f\u67e5\u8be2\u6587\u6863\u4fe1\u606f\uff0c\u6253\u5370\u4fe1\u606f\u5982\u4e0b<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n81\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">2024-04-07 20:46:55.772  WARN 24760 --- [      main] org.elasticsearch.client.RestClient    : request [HEAD http:\/\/localhost:9200\/test_index\/_doc\/1] returned 1 warnings: [299 Elasticsearch-7.17.18-8682172c2130b9a411b1bd5ff37c9792367de6b0 \"Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.17\/security-minimal-setup.html to enable security.\"]<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">BooleanResponse: true<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">2024-04-07 20:46:55.789  WARN 24760 --- [      main] org.elasticsearch.client.RestClient    : request [GET http:\/\/localhost:9200\/test_index\/_doc\/1] returned 1 warnings: [299 Elasticsearch-7.17.18-8682172c2130b9a411b1bd5ff37c9792367de6b0 \"Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.17\/security-minimal-setup.html to enable security.\"]<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">GetResponse: {\"_index\":\"test_index\",\"found\":true,\"_id\":\"1\",\"_primary_term\":1,\"_seq_no\":0,\"_source\":\"UserModel(username=\u5f20\u4e09, password=zhangsan)\",\"_type\":\"_doc\",\"_version\":1}<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">{\"username\":\"\u5f20\u4e09\",\"password\":\"zhangsan\"}<\/span><\/pre>\n<h2 cid=\"n82\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.3 \u66f4\u65b0\u6587\u6863<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n83\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsUpdate<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span> <span style=\"color: rgb(0, 0, 0);\">userModel<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e09\u4e09\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"zhangsansan\"<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">UpdateRequest<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">UpdateRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">id<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Time<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">time<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1s\"<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">doc<\/span>(<span style=\"color: rgb(0, 0, 0);\">userModel<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">UpdateResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">update<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n84\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u7ed3\u679c\uff0c\u66f4\u65b0\u6210\u529f<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n85\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">UpdateResponse: {\"_id\":\"1\",\"_index\":\"test_index\",\"_primary_term\":1,\"result\":\"updated\",\"_seq_no\":1,\"_shards\":{\"failed\":0.0,\"successful\":1.0,\"total\":2.0},\"_type\":\"_doc\",\"_version\":2}<\/span><\/pre>\n<p cid=\"n86\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u67e5\u770belasticsearch-head\uff0c\u66f4\u65b0\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000615\" data-ratio=\"0.4936998854524628\" data-s=\"300,640\"  data-type=\"png\" data-w=\"873\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152129579.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000615\" data-ratio=\"0.4936998854524628\" data-s=\"300,640\"  data-type=\"png\" data-w=\"873\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152129579.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n88\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.4 \u5220\u9664\u6587\u6863<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n89\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsDelete<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">DeleteRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">DeleteRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">id<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Time<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">time<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1s\"<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">DeleteResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">delete<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n90\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u7ed3\u679c\uff0c\u5220\u9664\u6210\u529f<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n91\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">DeleteResponse: {\"_id\":\"1\",\"_index\":\"test_index\",\"_primary_term\":1,\"result\":\"deleted\",\"_seq_no\":2,\"_shards\":{\"failed\":0.0,\"successful\":1.0,\"total\":2.0},\"_type\":\"_doc\",\"_version\":3}<\/span><\/pre>\n<p cid=\"n92\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u67e5\u770belasticsearch-head\uff0c\u5220\u9664\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000616\" data-ratio=\"0.5055401662049861\" data-s=\"300,640\"  data-type=\"png\" data-w=\"722\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152131758.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000616\" data-ratio=\"0.5055401662049861\" data-s=\"300,640\"  data-type=\"png\" data-w=\"722\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152131758.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n94\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.5 \u6279\u91cf\u63d2\u5165<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n95\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsBulk<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">List<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">BulkOperation<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">operations<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">ArrayList<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;&gt;<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(119, 0, 136);\">for<\/span> (<span style=\"color: rgb(0, 136, 85);\">int<\/span> <span style=\"color: rgb(0, 0, 0);\">i<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(17, 102, 68);\">0<\/span>; <span style=\"color: rgb(0, 0, 0);\">i<\/span> <span style=\"color: rgb(152, 26, 26);\">&lt;<\/span> <span style=\"color: rgb(17, 102, 68);\">100<\/span>; <span style=\"color: rgb(0, 0, 0);\">i<\/span><span style=\"color: rgb(152, 26, 26);\">++<\/span>) {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span> <span style=\"color: rgb(0, 0, 0);\">userModel<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e09\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">i<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"zhangsan\"<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(0, 0, 0);\">i<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">      <span style=\"color: rgb(0, 0, 0);\">operations<\/span>.<span style=\"color: rgb(0, 0, 0);\">add<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">BulkOperation<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">IndexOperation<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">           .<span style=\"color: rgb(0, 0, 0);\">id<\/span>(<span style=\"color: rgb(0, 136, 85);\">String<\/span>.<span style=\"color: rgb(0, 0, 0);\">valueOf<\/span>(<span style=\"color: rgb(0, 0, 0);\">i<\/span> <span style=\"color: rgb(152, 26, 26);\">+<\/span> <span style=\"color: rgb(17, 102, 68);\">1<\/span>))<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">           .<span style=\"color: rgb(0, 0, 0);\">document<\/span>(<span style=\"color: rgb(0, 0, 0);\">userModel<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">           .<span style=\"color: rgb(0, 0, 0);\">build<\/span>()));<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">     }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">BulkRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">BulkRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Time<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">time<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">operations<\/span>(<span style=\"color: rgb(0, 0, 0);\">operations<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">BulkResponse<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">bulk<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n96\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u7ed3\u679c\uff0c\u6279\u91cf\u63d2\u5165\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000618\" data-ratio=\"0.7785388127853882\" data-s=\"300,640\"  data-type=\"png\" data-w=\"876\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152133777.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000618\" data-ratio=\"0.7785388127853882\" data-s=\"300,640\"  data-type=\"png\" data-w=\"876\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152133777.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n98\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.6 \u5206\u8bcd\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n99\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/....<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsMatchQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u67e5\u8be2\u6761\u4ef6<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">MatchQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">matchQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">MatchQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"username\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e091\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u6784\u5efa\u641c\u7d22\u6761\u4ef6<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">match<\/span>(<span style=\"color: rgb(0, 0, 0);\">matchQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n100\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7\uff0c\u67e5\u8be2\u6210\u529f<\/span><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-imgfileid=\"100000617\" data-ratio=\"0.2101851851851852\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1080\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152135681.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-imgfileid=\"100000617\" data-ratio=\"0.2101851851851852\" data-s=\"300,640\"  data-type=\"png\" data-w=\"1080\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152135681.png\"  \/><\/noscript><\/p>\n<h2 cid=\"n102\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.7 \u7cbe\u786e\u5339\u914d<\/span><\/h2>\n<p cid=\"n103\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u8fd9\u91cc\uff0c\u56e0\u4e3a\u6211\u4eec\u6ca1\u6709\u5206\u8bcd\u5668\uff0c\u6240\u4ee5\u67e5\u8be2\u5b57\u6bb5\u9700\u8981\u52a0\u4e0akeyword\u5b57\u6bb5<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n104\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(85, 85, 85);\">@SpringBootTest<\/span>(<span style=\"color: rgb(0, 0, 0);\">classes<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchApplication<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>, <span style=\"color: rgb(0, 0, 0);\">webEnvironment<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">SpringBootTest<\/span>.<span style=\"color: rgb(0, 0, 0);\">WebEnvironment<\/span>.<span style=\"color: rgb(0, 0, 0);\">DEFINED_PORT<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(119, 0, 136);\">class<\/span> <span style=\"color: rgb(0, 0, 255);\">ElasticsearchApplicationTest<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Autowired<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">private<\/span> <span style=\"color: rgb(0, 0, 0);\">ElasticsearchClient<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>;<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span role=\"presentation\" cm-text=\"\t\" style=\"font-family: var(--monospace);display: inline-block;\">    <\/span><span style=\"color: rgb(170, 85, 0);\">\/\/...<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 0);\">contextLoadsTermQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">TermQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">termQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">TermQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"username.keyword\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">value<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e091\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">term<\/span>(<span style=\"color: rgb(0, 0, 0);\">termQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">}<\/span><\/pre>\n<p cid=\"n105\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7\uff0c\u67e5\u8be2\u6210\u529f<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n106\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"2\",\"_score\":4.2096553,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e091, password=zhangsan1)\"}]<\/span><\/pre>\n<h2 cid=\"n107\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.8 \u7ec4\u5408\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n108\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsBoolQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">TermQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">termQuery1<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">TermQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"username.keyword\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">value<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"\u5f20\u4e091\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">TermQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">termQuery2<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">TermQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"password\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">value<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"zhangsan2\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/\u7ec4\u5408\u67e5\u8be2<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/must  AND<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/mustNot NOT<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(170, 85, 0);\">\/\/should OR<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">BoolQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">boolQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">BoolQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">should<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">term<\/span>(<span style=\"color: rgb(0, 0, 0);\">termQuery1<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">should<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">term<\/span>(<span style=\"color: rgb(0, 0, 0);\">termQuery2<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">bool<\/span>(<span style=\"color: rgb(0, 0, 0);\">boolQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n109\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n110\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"2\",\"_score\":4.2096553,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e091, password=zhangsan1)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"3\",\"_score\":4.2096553,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e092, password=zhangsan2)\"}]<\/span><\/pre>\n<h2 cid=\"n111\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.9 \u6a21\u7cca\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n112\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsFuzzyQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">FuzzyQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">fuzzyQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">FuzzyQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"password\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">value<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"zhangsan20\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">fuzzy<\/span>(<span style=\"color: rgb(0, 0, 0);\">fuzzyQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n113\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n114\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"21\",\"_score\":4.2096553,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0920, password=zhangsan20)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"11\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0910, password=zhangsan10)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"22\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0921, password=zhangsan21)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"23\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0922, password=zhangsan22)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"24\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0923, password=zhangsan23)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"25\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0924, password=zhangsan24)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"26\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0925, password=zhangsan25)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"27\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0926, password=zhangsan26)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"28\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0927, password=zhangsan27)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"29\",\"_score\":3.7886896,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0928, password=zhangsan28)\"}]<\/span><\/pre>\n<h2 cid=\"n115\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.10 \u6839\u636eID\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n116\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsIdsQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">IdsQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">idsQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">IdsQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">values<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"1\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"2\"<\/span>, <span style=\"color: rgb(170, 17, 17);\">\"3\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">ids<\/span>(<span style=\"color: rgb(0, 0, 0);\">idsQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n117\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n118\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"1\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e090, password=zhangsan0)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"2\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e091, password=zhangsan1)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"3\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e092, password=zhangsan2)\"}]<\/span><\/pre>\n<h2 cid=\"n119\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.11 \u8303\u56f4\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n120\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsRangeQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">RangeQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">rangeQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">RangeQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"password\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">gte<\/span>(<span style=\"color: rgb(0, 0, 0);\">JsonData<\/span>.<span style=\"color: rgb(0, 0, 0);\">of<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"zhangsan10\"<\/span>))<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">lte<\/span>(<span style=\"color: rgb(0, 0, 0);\">JsonData<\/span>.<span style=\"color: rgb(0, 0, 0);\">of<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"zhangsan15\"<\/span>))<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">range<\/span>(<span style=\"color: rgb(0, 0, 0);\">rangeQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n121\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n122\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"11\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0910, password=zhangsan10)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"12\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0911, password=zhangsan11)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"13\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0912, password=zhangsan12)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"14\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0913, password=zhangsan13)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"15\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0914, password=zhangsan14)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"16\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0915, password=zhangsan15)\"}]<\/span><\/pre>\n<h2 cid=\"n123\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.12 \u901a\u914d\u7b26\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n124\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsWildcardQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">WildcardQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">wildcardQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">WildcardQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"password\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">value<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"zhang*9\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">wildcard<\/span>(<span style=\"color: rgb(0, 0, 0);\">wildcardQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n125\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n126\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"10\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e099, password=zhangsan9)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"20\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0919, password=zhangsan19)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"30\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0929, password=zhangsan29)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"40\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0939, password=zhangsan39)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"50\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0949, password=zhangsan49)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"60\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0959, password=zhangsan59)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"70\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0969, password=zhangsan69)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"80\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0979, password=zhangsan79)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"90\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0989, password=zhangsan89)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"100\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0999, password=zhangsan99)\"}]<\/span><\/pre>\n<h2 cid=\"n127\" mdtype=\"heading\" style=\"break-after: avoid-page;break-inside: avoid;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;padding-bottom: 0.3em;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">6.13 \u524d\u7f00\u5339\u914d\u67e5\u8be2<\/span><\/h2>\n<pre spellcheck=\"false\" lang=\"java\" cid=\"n128\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(85, 85, 85);\">@Test<\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">  <span style=\"color: rgb(119, 0, 136);\">public<\/span> <span style=\"color: rgb(0, 136, 85);\">void<\/span> <span style=\"color: rgb(0, 0, 255);\">contextLoadsPrefixQuery<\/span>() <span style=\"color: rgb(119, 0, 136);\">throws<\/span> <span style=\"color: rgb(0, 0, 0);\">IOException<\/span> {<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">PrefixQuery<\/span> <span style=\"color: rgb(0, 0, 0);\">prefixQuery<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">PrefixQuery<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">field<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"password\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">value<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"zhangsan9\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span> <span style=\"color: rgb(0, 0, 0);\">request<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">SearchRequest<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>()<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">index<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"test_index\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">timeout<\/span>(<span style=\"color: rgb(170, 17, 17);\">\"10s\"<\/span>)<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">query<\/span>(<span style=\"color: rgb(119, 0, 136);\">new<\/span> <span style=\"color: rgb(0, 0, 0);\">Query<\/span>.<span style=\"color: rgb(0, 0, 0);\">Builder<\/span>().<span style=\"color: rgb(0, 0, 0);\">prefix<\/span>(<span style=\"color: rgb(0, 0, 0);\">prefixQuery<\/span>).<span style=\"color: rgb(0, 0, 0);\">build<\/span>())<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">         .<span style=\"color: rgb(0, 0, 0);\">build<\/span>();<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\"><span cm-text=\"\"><\/span><\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">SearchResponse<\/span><span style=\"color: rgb(152, 26, 26);\">&lt;<\/span><span style=\"color: rgb(0, 0, 0);\">UserModel<\/span><span style=\"color: rgb(152, 26, 26);\">&gt;<\/span> <span style=\"color: rgb(0, 0, 0);\">response<\/span> <span style=\"color: rgb(152, 26, 26);\">=<\/span> <span style=\"color: rgb(0, 0, 0);\">elasticsearchClient<\/span>.<span style=\"color: rgb(0, 0, 0);\">search<\/span>(<span style=\"color: rgb(0, 0, 0);\">request<\/span>, <span style=\"color: rgb(0, 0, 0);\">UserModel<\/span>.<span style=\"color: rgb(119, 0, 136);\">class<\/span>);<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">    <span style=\"color: rgb(0, 0, 0);\">System<\/span>.<span style=\"color: rgb(0, 0, 0);\">out<\/span>.<span style=\"color: rgb(0, 0, 0);\">println<\/span>(<span style=\"color: rgb(0, 0, 0);\">response<\/span>.<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">hits<\/span>().<span style=\"color: rgb(0, 0, 0);\">toString<\/span>());<\/span><span role=\"presentation\" style=\"padding-right: 0.1px;\">   }<\/span><\/pre>\n<p cid=\"n129\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u6d4b\u8bd5\u901a\u8fc7<\/span><\/p>\n<pre spellcheck=\"false\" lang=\"\" cid=\"n130\" mdtype=\"fences\" style=\"overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding-top: 8px;padding-right: 4px;padding-bottom: 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;color: rgb(51, 51, 51);letter-spacing: normal;\"><span role=\"presentation\" style=\"padding-right: 0.1px;\">[Hit: {\"_index\":\"test_index\",\"_id\":\"10\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e099, password=zhangsan9)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"91\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0990, password=zhangsan90)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"92\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0991, password=zhangsan91)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"93\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0992, password=zhangsan92)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"94\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0993, password=zhangsan93)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"95\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0994, password=zhangsan94)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"96\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0995, password=zhangsan95)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"97\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0996, password=zhangsan96)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"98\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0997, password=zhangsan97)\"}, Hit: {\"_index\":\"test_index\",\"_id\":\"99\",\"_score\":1.0,\"_type\":\"_doc\",\"_source\":\"UserModel(username=\u5f20\u4e0998, password=zhangsan98)\"}]<\/span><\/pre>\n<p cid=\"n131\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u5176\u4ed6\u7528\u6cd5\u7c7b\u4f3c\uff0c\u8fd9\u91cc\u4e0d\u518d\u6d4b\u8bd5\u4e86\u3002<\/span><\/p>\n<p cid=\"n132\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">\u81f3\u6b64\uff0cSpringBoot\u6210\u529f\u6574\u5408es\u4e14\u6d4b\u8bd5\u901a\u8fc7\u3002<\/span><\/p>\n<p cid=\"n142\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\">\n<hr style=\"box-sizing: content-box;height: 2px;margin-top: 16px;margin-bottom: 16px;border-width: 0px;border-style: none;border-color: initial;background-color: rgb(231, 231, 231);\"  \/>\n<p cid=\"n145\" mdtype=\"paragraph\" style=\"orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;font-size: 16px;letter-spacing: normal;text-align: start;\"><span md-inline=\"plain\">CSDN\uff1a<\/span><span md-inline=\"link\"><span md-inline=\"plain\">https:\/\/blog.csdn.net\/dkbnull\/article\/details\/137748709<\/span><\/span><\/p>\n<hr style=\"box-sizing: content-box;height: 2px;margin-top: 16px;margin-bottom: 16px;border-width: 0px;border-style: none;border-color: initial;background-color: rgb(231, 231, 231);\"  \/>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u7a0b\u5e8f\u5458null              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u6587\u7ae0\u4e2d\u4ee3\u7801\u4e0d\u4fbf\u4e8e\u9605\u8bfb\uff0c\u8bf7\u4f7f\u7528\u7535\u8111\u67e5\u770b\u6216\u70b9\u51fb\u9605\u8bfb\u539f\u6587\u3002\u6e90\u7801\u8be6\u89c1\uff1a GitHub\uff1ahttps:\/\/github.com\/dkbnu &#8230;<\/p>\n","protected":false},"author":1,"featured_media":4239,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[41,7],"tags":[],"class_list":["post-4257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-elasticsearch","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152102502-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152107428.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152102502-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152102502-1024x435.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152107428.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152102502-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152102502-1024x435.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152102502.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152107428.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152107428.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152111992.png","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152111992.png","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152112622.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152112622.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152117257.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152117257.png","id":"image7"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152118709.png","id":"image8"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152118709.png","id":"image9"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152120153.png","id":"image10"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152120153.png","id":"image11"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152121236.png","id":"image12"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152121236.png","id":"image13"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152123992.png","id":"image14"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152123992.png","id":"image15"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152124611.png","id":"image16"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152124611.png","id":"image17"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152126281.png","id":"image18"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152126281.png","id":"image19"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152128502.png","id":"image20"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152128502.png","id":"image21"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152129579.png","id":"image22"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152129579.png","id":"image23"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152131758.png","id":"image24"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152131758.png","id":"image25"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152133777.png","id":"image26"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152133777.png","id":"image27"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152135681.png","id":"image28"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/05\/20240524152135681.png","id":"image29"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Elasticsearch","post_date":"2024-04-14","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":303,"next_post_id":3958,"next_post_title":"\u5904\u7406\u8bf7\u6c42\u5934\uff1a@RequestHeader\u6ce8\u89e3\u7684\u4f7f\u7528","previous_post_id":4279,"previous_post_title":"Spring Boot\u6574\u5408Dubbo+ZooKeeper","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=4257"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/4257\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/4239"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=4257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=4257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=4257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}