{"id":92573,"date":"2026-08-10T16:40:45","date_gmt":"2026-08-10T08:40:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/92573.html"},"modified":"2026-08-10T16:40:45","modified_gmt":"2026-08-10T08:40:45","slug":"elasticsearch%ef%bc%9a%e5%88%97%e5%bc%8f%e7%b4%a2%e5%bc%95%e6%a8%a1%e5%bc%8f-columnar-index-mode","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/92573.html","title":{"rendered":"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode"},"content":{"rendered":"<p>\u6ce8\u610f&#xff1a;\u8fd9\u4e2a\u76ee\u524d\u5728 Elastic Stack 9.5 \u7248\u672c\u4e2d\u662f Preview\u3002\u540e\u671f\u7248\u672c\u6709\u53ef\u80fd\u4f1a\u53d1\u751f\u53d8\u5316\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810084044-6a798e8c97748.webp\" \/><\/p>\n<p>\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u5c06 Elasticsearch \u8f6c\u53d8\u4e3a\u4e00\u79cd\u5206\u6790\u578b\u548c\u641c\u7d22\u578b\u5217\u5f0f\u5b58\u50a8&#xff0c;\u7528\u4e8e\u542f\u7528\u4e86\u8be5\u6a21\u5f0f\u7684\u7d22\u5f15\u3002\u5217\u5f0f\u6a21\u5f0f\u4e0d\u4f1a\u9488\u5bf9\u4e0d\u540c\u7684\u67e5\u8be2\u8def\u5f84&#xff0c;\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u4fdd\u7559\u591a\u4e2a\u526f\u672c&#xff0c;\u800c\u662f\u9ed8\u8ba4\u5c06\u5b57\u6bb5\u4f5c\u4e3a doc values \u5b58\u50a8\u4e00\u6b21\u3002\u8fd9\u79cd\u7b56\u7565\u53ef\u4ee5\u964d\u4f4e\u9ad8\u6570\u636e\u91cf\u3001\u4ee5\u5206\u6790\u4e3a\u4e3b\u7684\u6570\u636e\u7684\u5b58\u50a8\u6210\u672c&#xff0c;\u540c\u65f6\u4fdd\u6301\u76f8\u540c\u7684 API\u3001\u4eea\u8868\u677f\u548c\u96c6\u6210\u3002<\/p>\n<p>\u5217\u5f0f\u6a21\u5f0f\u4e0e\u73b0\u6709\u7684\u7d22\u5f15\u6a21\u5f0f\u5e76\u5b58&#xff0c;\u4f8b\u5982 standard\u3001logsdb \u548c time_series\u3002\u4f60\u53ef\u4ee5\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u9488\u5bf9\u6bcf\u4e2a\u7d22\u5f15&#xff08;\u6216\u5728\u6a21\u677f\u4e2d&#xff09;\u9009\u62e9\u8be5\u6a21\u5f0f&#xff1b;\u7d22\u5f15\u521b\u5efa\u540e\u65e0\u6cd5\u66f4\u6539\u6a21\u5f0f\u3002<\/p>\n<p>\u672c\u9875\u9762\u4ecb\u7ecd\u4ec0\u4e48\u662f\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u3001\u4f55\u65f6\u4f7f\u7528\u5b83&#xff0c;\u4ee5\u53ca\u5b83\u5982\u4f55\u4e0e Elasticsearch \u7684\u5176\u4ed6\u6570\u636e\u5b58\u50a8\u6a21\u5f0f\u914d\u5408\u4f7f\u7528\u3002\u6709\u5173\u542f\u7528\u6b65\u9aa4\u3001\u6392\u5e8f\u3001_source \u6a21\u5f0f\u548c\u9650\u5236&#xff0c;\u8bf7\u53c2\u9605 Elasticsearch \u53c2\u8003\u4e2d\u7684\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p>\u66f4\u591a\u9605\u8bfb&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4e3a\u4ec0\u4e48 Elasticsearch \u6b63\u5728\u6210\u4e3a\u5217\u5f0f\u6570\u636e\u5e93<\/p>\n<\/li>\n<li>\n<p id=\"articleContentId\">\u5feb 17% \u7684\u641c\u7d22&#xff0c;\u96f6\u914d\u7f6e&#xff1a;Elasticsearch \u4e2d\u7684\u81ea\u52a8\u6821\u51c6\u5411\u91cf\u91cf\u5316<\/p>\n<\/li>\n<\/ul>\n<h2>\u4f55\u65f6\u4f7f\u7528\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u4f55\u65f6\u4f7f\u7528\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f<\/h2>\n<p>\u5f53\u4f60\u7684\u6570\u636e\u4ee5\u5927\u91cf\u5199\u5165\u3001\u4ee5\u5206\u6790\u578b\u65b9\u5f0f\u8fdb\u884c\u67e5\u8be2&#xff08;\u8fc7\u6ee4\u3001\u805a\u5408\u548c\u4eea\u8868\u677f&#xff09;&#xff0c;\u5e76\u4e14\u9700\u8981\u957f\u671f\u4fdd\u7559\u65f6&#xff0c;\u53ef\u4ee5\u9009\u62e9\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u3002\u5178\u578b\u9002\u7528\u573a\u666f\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5927\u89c4\u6a21\u65e5\u5fd7\u3001\u8ffd\u8e2a\u548c\u53ef\u89c2\u6d4b\u6027&#xff1a;\u6570\u636e\u5199\u5165\u901f\u7387\u9ad8&#xff0c;\u5b58\u50a8\u548c\u805a\u5408\u6210\u672c\u5360\u4e3b\u5bfc&#xff0c;\u540c\u65f6\u4ecd\u7136\u9700\u8981\u5bf9\u6d88\u606f\u5b57\u6bb5\u8fdb\u884c\u5168\u6587\u641c\u7d22\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b89\u5168\u9065\u6d4b\u548c\u5a01\u80c1\u72e9\u730e&#xff1a;\u5728\u5927\u578b\u4e8b\u4ef6\u5b58\u50a8\u4e2d\u8fdb\u884c\u5206\u9762\u63a2\u7d22\u548c\u5386\u53f2\u67e5\u8be2&#xff0c;\u540c\u65f6\u4fdd\u7559\u641c\u7d22\u884c\u4e3a&#xff0c;\u4ee5\u652f\u6301\u6570\u636e\u900f\u89c6\u548c\u67e5\u627e\u5de5\u4f5c\u6d41\u3002<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u8425\u548c\u4e1a\u52a1\u5206\u6790&#xff1a;\u9488\u5bf9\u5e94\u7528\u4e8b\u4ef6\u3001\u4e8b\u52a1\u6216 IoT \u8bfb\u6570\u6784\u5efa\u4eea\u8868\u677f\u548c\u6267\u884c\u805a\u5408&#xff0c;\u5426\u5219\u8fd9\u4e9b\u5de5\u4f5c\u8d1f\u8f7d\u53ef\u80fd\u4f1a\u4fc3\u4f7f\u4f60\u91c7\u7528\u72ec\u7acb\u7684\u5206\u6790\u578b\u5b58\u50a8\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5217\u5f0f\u6a21\u5f0f\u5e76\u4e0d\u662f\u901a\u7528\u7684\u9ed8\u8ba4\u9009\u62e9\u3002<\/p>\n<p>\u5f53\u4f60\u7684\u5de5\u4f5c\u8d1f\u8f7d\u4ee5\u6587\u6863\u641c\u7d22\u4e3a\u4e3b&#xff0c;\u9700\u8981\u4fdd\u7559\u63d0\u4ea4\u65f6\u7684\u539f\u59cb JSON _source&#xff0c;\u6216\u8005\u9ed8\u8ba4\u4f9d\u8d56\u5927\u591a\u6570\u5b57\u6bb5\u4e0a\u7684\u5012\u6392\u7d22\u5f15\u53ca\u76f8\u5173\u7ed3\u6784\u65f6&#xff0c;\u4f18\u5148\u4f7f\u7528 standard \u7d22\u5f15&#xff08;\u6216\u5176\u4ed6\u4e13\u7528\u6a21\u5f0f&#xff09;\u3002<\/p>\n<p>\u5bf9\u4e8e\u9700\u8981\u65f6\u95f4\u5e8f\u5217\u7ef4\u5ea6\u548c\u6307\u6807\u5b57\u6bb5\u8bed\u4e49\u7684\u6307\u6807\u6570\u636e&#xff0c;\u5e94\u4f7f\u7528\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u6d41\u3002<\/p>\n<p>\u5bf9\u4e8e\u5e0c\u671b\u4fdd\u7559\u5f53\u524d logsdb \u9ed8\u8ba4\u8bbe\u7f6e\u3001\u4f46\u53c8\u4e0d\u60f3\u5207\u6362\u5230\u5b8c\u5168\u5217\u5f0f\u5b58\u50a8\u7684\u65e5\u5fd7\u6570\u636e&#xff0c;\u5e94\u4f7f\u7528\u65e5\u5fd7\u6570\u636e\u6d41\u3002<\/p>\n<\/p>\n<h2>\u5217\u5f0f\u6a21\u5f0f<\/h2>\n<h3><\/h3>\n<p>index.mode \u7684\u4e24\u4e2a\u503c\u53ef\u4ee5\u542f\u7528\u5217\u5f0f\u5b58\u50a8&#xff1a;<\/p>\n<li>columnar\n<li>\u901a\u7528\u578b\u5217\u5f0f\u5b58\u50a8&#xff0c;\u4e0d\u5305\u542b\u9488\u5bf9\u7279\u5b9a\u4f7f\u7528\u573a\u666f\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u3002<\/li>\n<li>\u9002\u7528\u4e8e\u975e\u65e5\u5fd7\u5bfc\u5411\u7684\u666e\u901a\u7d22\u5f15\u548c\u6570\u636e\u6d41\u3002<\/li>\n<\/li>\n<li>logsdb_columnar\n<li>\u91c7\u7528\u76f8\u540c\u7684\u5217\u5f0f\u5b58\u50a8\u884c\u4e3a&#xff0c;\u540c\u65f6\u63d0\u4f9b\u9762\u5411\u65e5\u5fd7\u7684\u9ed8\u8ba4\u8bbe\u7f6e&#xff0c;\u5305\u62ec\u9ed8\u8ba4\u7684 &#064;timestamp \u6620\u5c04&#xff0c;\u4ee5\u53ca\u5f53\u5b58\u5728 &#064;timestamp \u548c host.name \u65f6\u8fdb\u884c\u7d22\u5f15\u6392\u5e8f\u3002\u5f53\u4f60\u5e0c\u671b\u65e5\u5fd7\u6570\u636e\u4f7f\u7528\u5217\u5f0f\u5b58\u50a8&#xff0c;\u800c\u4e0d\u662f\u9ed8\u8ba4\u7684 logsdb \u6a21\u5f0f\u65f6\u4f7f\u7528\u5b83\u3002<\/li>\n<li>\n<p>\u5982\u679c\u5b58\u5728 &#064;timestamp \u548c host.name \u6620\u5c04&#xff0c;\u5219\u542f\u7528\u7d22\u5f15\u6392\u5e8f\u3002<\/p>\n<\/li>\n<\/li>\n<p>\u8fd9\u4e24\u79cd\u6a21\u5f0f\u90fd\u9002\u7528\u4e8e\u7d22\u5f15&#xff0c;\u4e5f\u9002\u7528\u4e8e\u901a\u8fc7\u6a21\u677f\u914d\u7f6e\u7684\u6570\u636e\u6d41\u540e\u5907\u7d22\u5f15\u3002\u4e24\u79cd\u6a21\u5f0f\u90fd\u4e25\u683c\u91c7\u7528\u5217\u5f0f\u5b58\u50a8&#xff1a;\u5b83\u4eec\u4f1a\u62d2\u7edd\u6620\u5c04\u7ea7\u522b\u7684 runtime \u5b57\u6bb5&#xff0c;\u5e76\u7981\u6b62\u5173\u95ed _source\u3002<\/p>\n<\/p>\n<h3>\u5de5\u4f5c\u539f\u7406<\/h3>\n<p>\u4ece\u8f83\u9ad8\u5c42\u9762\u6765\u770b&#xff0c;\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u6539\u53d8\u4e86\u5b58\u50a8\u9ed8\u8ba4\u8bbe\u7f6e&#xff0c;\u540c\u65f6\u4fdd\u7559\u4e86\u719f\u6089\u7684\u6587\u6863\u548c\u67e5\u8be2\u6a21\u578b&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6309\u5b57\u6bb5\u53ea\u5b58\u50a8\u4e00\u6b21&#xff1a;\u975e\u6587\u672c\u5b57\u6bb5\u4ee5 doc values \u7684\u5f62\u5f0f\u5b58\u50a8&#xff0c;\u9ed8\u8ba4\u4e0d\u4f1a\u5efa\u7acb\u7d22\u5f15&#xff0c;\u4ece\u800c\u907f\u514d\u4e3a\u5206\u6790\u578b\u5de5\u4f5c\u8d1f\u8f7d\u53ef\u80fd\u4e0d\u9700\u8981\u7684\u6570\u636e\u7ed3\u6784\u4ed8\u51fa\u989d\u5916\u6210\u672c\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728\u9700\u8981\u7684\u5730\u65b9\u4fdd\u7559\u641c\u7d22\u80fd\u529b&#xff1a;\u6587\u672c\u5b57\u6bb5\u9ed8\u8ba4\u4ecd\u4f1a\u5efa\u7acb\u7d22\u5f15&#xff0c;\u56e0\u6b64\u5168\u6587\u641c\u7d22\u4ecd\u7136\u53ef\u4ee5\u5728\u65e5\u5fd7\u6d88\u606f\u7b49\u5b57\u6bb5\u4e0a\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<\/li>\n<li>\n<p>\u6241\u5e73\u5b57\u6bb5\u5e03\u5c40&#xff1a;Object \u548c passthrough \u6620\u5c04\u4f1a\u88ab\u6241\u5e73\u5316\u4e3a\u53f6\u5b50\u5b57\u6bb5&#xff0c;\u8fd9\u4e0e\u5217\u5f0f\u7cfb\u7edf\u7ec4\u7ec7\u6570\u636e\u4ee5\u5b9e\u73b0\u9ad8\u6548\u626b\u63cf\u548c\u538b\u7f29\u7684\u65b9\u5f0f\u76f8\u5339\u914d\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u7d22\u5f15\u6392\u5e8f\u5bf9\u4e8e\u538b\u7f29\u548c\u67e5\u8be2\u6027\u80fd\u4ecd\u7136\u975e\u5e38\u91cd\u8981\u3002logsdb_columnar \u4f1a\u4e3a\u65e5\u5fd7\u8bbe\u7f6e\u5408\u7406\u7684\u9ed8\u8ba4\u6392\u5e8f&#xff1b;\u5bf9\u4e8e columnar&#xff0c;\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u8bbf\u95ee\u6a21\u5f0f\u9009\u62e9\u6392\u5e8f\u5b57\u6bb5\u3002\u8be6\u7ec6\u4fe1\u606f\u8bf7\u53c2\u9605\u53c2\u8003\u6587\u6863\u3002<\/p>\n<p>\u5217\u5f0f\u6a21\u5f0f\u5e76\u4e0d\u4f1a\u53d6\u4ee3\u6838\u5fc3\u6570\u636e\u5b58\u50a8\u6982\u5ff5&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u4f60\u4ecd\u7136\u4f1a\u5728\u7d22\u5f15&#xff08;\u6216\u6570\u636e\u6d41&#xff09;\u4e2d\u5b58\u50a8 JSON \u6587\u6863\u3001\u5b9a\u4e49\u6620\u5c04&#xff0c;\u5e76\u901a\u8fc7\u540d\u79f0\u3001\u522b\u540d\u6216\u6570\u636e\u6d41\u6307\u5b9a\u76ee\u6807\u7d22\u5f15\u3002<\/p>\n<\/li>\n<li>\n<p>\u5206\u7247\u3001\u526f\u672c\u4ee5\u53ca\u8fd1\u5b9e\u65f6\u641c\u7d22\u7684\u884c\u4e3a\u4e0e\u5176\u4ed6\u7d22\u5f15\u6a21\u5f0f\u4e00\u81f4\u3002<\/p>\n<\/li>\n<li>\n<p>\u73b0\u6709\u7684\u67e5\u8be2\u8bed\u8a00\u3001Kibana \u53ef\u89c6\u5316\u3001\u544a\u8b66\u548c\u6570\u636e\u6444\u53d6\u96c6\u6210\u4ecd\u7136\u53ef\u4ee5\u9488\u5bf9\u5217\u5f0f\u7d22\u5f15\u8fd0\u884c\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u6539\u53d8\u7684\u662f Elasticsearch \u5728\u78c1\u76d8\u4e0a\u7684\u6570\u636e\u5e03\u5c40\u65b9\u5f0f&#xff0c;\u4ee5\u53ca\u9ed8\u8ba4\u6784\u5efa\u54ea\u4e9b\u6570\u636e\u7ed3\u6784&#xff0c;\u800c\u4e0d\u662f\u4f60\u65e5\u5e38\u4e0e\u96c6\u7fa4\u4ea4\u4e92\u7684\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<h2>\u542f\u7528\u548c\u914d\u7f6e\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f<\/h2>\n<p>\u521b\u5efa\u4f7f\u7528 columnar \u6216 logsdb_columnar \u7684\u7d22\u5f15\u6216\u6a21\u677f&#xff0c;\u914d\u7f6e\u7d22\u5f15\u6392\u5e8f&#xff0c;\u5e76\u67e5\u770b _source \u6a21\u5f0f\u548c\u9650\u5236\u3002<\/p>\n<\/p>\n<p>\u542f\u7528\u5217\u5f0f\u6a21\u5f0f\u540e&#xff0c;Elasticsearch \u4f1a\u6210\u4e3a\u4e00\u4e2a\u5b8c\u6574\u7684\u5206\u6790\u578b\u548c\u641c\u7d22\u578b\u5217\u5f0f\u5b58\u50a8\u3002\u6211\u4eec\u5c06\u5728\u4e0b\u9762\u4ecb\u7ecd\u5982\u4f55\u542f\u7528\u5217\u5f0f\u6a21\u5f0f\u3001\u914d\u7f6e\u7d22\u5f15\u6392\u5e8f&#xff0c;\u4ee5\u53ca\u8fdb\u4e00\u6b65\u4ecb\u7ecd _source \u6a21\u5f0f\u548c\u9650\u5236\u3002<\/p>\n<p>\u4f60\u542f\u7528\u7684\u662f\u4e00\u7ec4\u6574\u4f53\u6027\u7684\u53d8\u66f4&#xff0c;\u8fd9\u4e9b\u53d8\u66f4\u5171\u540c\u4f7f Elasticsearch \u7684\u5b58\u50a8\u6a21\u578b\u4e0e\u4e13\u7528\u5217\u5f0f\u5b58\u50a8\u4fdd\u6301\u4e00\u81f4&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5b57\u6bb5\u53ea\u5b58\u50a8\u4e00\u6b21&#xff0c;\u5e76\u4e14\u4ec5\u4f5c\u4e3a doc values \u5b58\u50a8\u3002\u975e\u6587\u672c\u5b57\u6bb5\u9ed8\u8ba4\u4e0d\u4f1a\u5efa\u7acb\u7d22\u5f15&#xff0c;\u4ece\u800c\u6d88\u9664\u4e86\u7ef4\u62a4\u5197\u4f59\u7d22\u5f15\u7ed3\u6784\u6240\u4ea7\u751f\u7684\u5b58\u50a8\u6210\u672c\u3002\u6587\u672c\u5b57\u6bb5\u9ed8\u8ba4\u4ecd\u4f1a\u5efa\u7acb\u7d22\u5f15&#xff0c;\u4ee5\u652f\u6301\u5168\u6587\u641c\u7d22\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u4e8e\u672a\u5efa\u7acb\u7d22\u5f15\u7684\u5b57\u6bb5&#xff0c;\u9ed8\u8ba4\u542f\u7528 doc values skippers\u3002doc values skippers \u662f\u5e26\u6709\u5143\u6570\u636e&#xff08;\u4f8b\u5982\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c&#xff09;\u7684\u7d27\u51d1\u578b\u8df3\u8fc7\u5217\u8868&#xff0c;\u53ef\u4ee5\u5728\u6267\u884c\u67e5\u8be2\u65f6\u907f\u514d\u626b\u63cf\u5927\u91cf\u6570\u636e\u5757\u3002<\/p>\n<\/li>\n<li>\n<p>\u6620\u5c04\u59cb\u7ec8\u662f\u6241\u5e73\u7684&#xff0c;\u6620\u5c04\u4e2d\u7684 object \u548c passthrough \u5b57\u6bb5\u59cb\u7ec8\u4f1a\u81ea\u52a8\u6241\u5e73\u5316\u3002Nested \u5b57\u6bb5\u4e0d\u4f1a\u81ea\u52a8\u6241\u5e73\u5316\u3002<\/p>\n<\/li>\n<li>\n<p>\u6839\u636e\u4f60\u7684\u8bb8\u53ef\u8bc1&#xff0c;\u4f60\u53ef\u4ee5\u5728\u4e24\u79cd _source \u6a21\u5f0f\u4e4b\u95f4\u8fdb\u884c\u9009\u62e9\u3002\u5982\u679c\u4f7f\u7528 synthetic source&#xff0c;\u90a3\u4e48\u5728\u67e5\u8be2\u65f6\u8bf7\u6c42 _source \u65f6&#xff0c;\u4f1a\u81ea\u52a8\u751f\u6210\u6241\u5e73\u5316\u6216\u5217\u5f0f\u8868\u793a\u3002\u6216\u8005&#xff0c;\u8fd9\u79cd\u5217\u5f0f source \u53ef\u4ee5\u5728\u7d22\u5f15\u65f6\u751f\u6210&#xff0c;\u5e76\u4f5c\u4e3a doc values \u5b58\u50a8\u5230\u78c1\u76d8\u3002<\/p>\n<\/li>\n<li>\n<p>\u65b0\u7684\u591a\u503c\u8bed\u4e49&#xff1a;\u9ed8\u8ba4\u4fdd\u7559\u6bcf\u4e2a\u6587\u6863\u4e2d\u6bcf\u4e2a\u5b57\u6bb5\u591a\u4e2a\u503c\u7684\u539f\u59cb\u987a\u5e8f&#xff08;\u4f8b\u5982\u6570\u7ec4\u4e2d\u7684\u503c&#xff09;\u3002\u4e5f\u53ef\u4ee5\u5728\u6620\u5c04\u4e2d\u914d\u7f6e\u5b57\u6bb5&#xff0c;\u4f7f\u5176\u6bcf\u4e2a\u6587\u6863\u53ea\u5141\u8bb8\u4e00\u4e2a\u503c\u3002<\/p>\n<\/li>\n<li>\n<p>\u53ef\u4ee5\u5728\u6620\u5c04\u4e2d\u914d\u7f6e\u5b57\u6bb5&#xff0c;\u62d2\u7edd\u90a3\u4e9b\u6ca1\u6709\u8be5\u5b57\u6bb5\u503c\u7684\u6587\u6863\u3002<\/p>\n<\/li>\n<li>\n<p>_routing \u548c _id \u7b49\u5143\u6570\u636e\u5b57\u6bb5\u4e5f\u4f1a\u4f7f\u7528 doc values \u5b58\u50a8\u3002<\/p>\n<\/li>\n<li>\n<p>\u9ed8\u8ba4\u4f7f\u7528\u7ecf\u8fc7\u4f18\u5316\u7684 doc values \u683c\u5f0f&#xff0c;\u8fdb\u4e00\u6b65\u964d\u4f4e\u5b58\u50a8\u5360\u7528&#xff0c;\u5c24\u5176\u662f\u5728\u4e0e\u7d22\u5f15\u6392\u5e8f\u7ed3\u5408\u4f7f\u7528\u65f6\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u7ed3\u5408\u7d22\u5f15\u6392\u5e8f&#xff0c;\u5217\u5f0f\u6a21\u5f0f\u53ef\u4ee5\u8ba9 Elasticsearch \u7684\u5b58\u50a8\u5360\u7528\u548c\u5217\u5f0f\u8bbf\u95ee\u65b9\u5f0f\u8fbe\u5230\u4e13\u7528\u5217\u5f0f\u5b58\u50a8\u7684\u6c34\u5e73&#xff0c;\u540c\u65f6\u4fdd\u7559\u5b8c\u6574\u7684\u641c\u7d22\u548c\u805a\u5408\u80fd\u529b\u3002<\/p>\n<\/p>\n<h2>\u542f\u7528\u5217\u5f0f\u6a21\u5f0f<\/h2>\n<p>\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u8bbe\u7f6e mode \u7d22\u5f15\u8bbe\u7f6e\u3002\u7d22\u5f15\u521b\u5efa\u540e\u65e0\u6cd5\u66f4\u6539\u8be5\u8bbe\u7f6e\u3002<\/p>\n<p>PUT my-index<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;columnar&#034;<br \/>\n  }<br \/>\n} <\/p>\n<p>\u5bf9\u4e8e\u65e5\u5fd7\u6570\u636e&#xff0c;\u4f7f\u7528\u7ec4\u4ef6\u6a21\u677f\u4e3a\u6240\u6709 logs-*-* \u6570\u636e\u6d41\u542f\u7528 logsdb_columnar \u6a21\u5f0f&#xff1a;<\/p>\n<p>PUT _component_template\/logs&#064;custom<br \/>\n{<br \/>\n  &#034;template&#034;: {<br \/>\n    &#034;settings&#034;: {<br \/>\n      &#034;mode&#034;: &#034;logsdb_columnar&#034;<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u6240\u6709\u5339\u914d logs-*-* \u7684\u6570\u636e\u6d41\u90fd\u4f1a\u4f7f\u7528 logsdb&#xff0c;\u4f46\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u6a21\u677f\u540e&#xff0c;\u6240\u6709\u5339\u914d logs-*-* \u7684\u6570\u636e\u6d41\u90fd\u4f1a\u4f7f\u7528 logsdb_columnar\u3002<\/p>\n<p>\u6216\u8005\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u76f4\u63a5\u8bbe\u7f6e&#xff1a;<\/p>\n<p>PUT my-logs-index<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;logsdb_columnar&#034;<br \/>\n  }<br \/>\n} <\/p>\n<h3>\u7d22\u5f15\u6392\u5e8f<\/h3>\n<p>\u8bbe\u7f6e\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u65f6&#xff0c;\u4f60\u5fc5\u987b\u786e\u5b9a\u7d22\u5f15\u6392\u5e8f\u5b57\u6bb5\u3002\u5408\u7406\u7684\u7d22\u5f15\u6392\u5e8f\u5b57\u6bb5\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u5b58\u50a8\u6548\u7387\u5e76\u7f29\u77ed\u67e5\u8be2\u54cd\u5e94\u65f6\u95f4\u3002\u5408\u9002\u7684\u7d22\u5f15\u6392\u5e8f\u5b57\u6bb5\u53d6\u51b3\u4e8e\u4f7f\u7528\u573a\u666f\u548c\u6570\u636e\u3002<\/p>\n<p>logsdb_columnar \u7d22\u5f15\u6a21\u5f0f\u4e0e logsdb \u7d22\u5f15\u6a21\u5f0f\u4e00\u6837&#xff0c;\u9ed8\u8ba4\u4f7f\u7528\u5347\u5e8f\u6392\u5217\u7684 host.name \u5b57\u6bb5\u548c\u964d\u5e8f\u6392\u5217\u7684 &#064;timestamp \u5b57\u6bb5\u4f5c\u4e3a\u7d22\u5f15\u6392\u5e8f\u5b57\u6bb5\u3002\u4e3b\u673a\u901a\u5e38\u4f1a\u751f\u6210\u76f8\u4f3c\u7684\u65e5\u5fd7&#xff0c;\u56e0\u6b64\u5c06\u540c\u4e00\u4e3b\u673a\u7684\u65e5\u5fd7\u6761\u76ee\u6309\u987a\u5e8f\u5b58\u50a8\u5728\u78c1\u76d8\u4e0a&#xff0c;\u53ef\u4ee5\u63d0\u9ad8\u8fd0\u884c\u957f\u5ea6\u7f16\u7801\u548c\u589e\u91cf\u7f16\u7801\u7b49\u538b\u7f29\u6280\u672f\u7684\u6548\u7387\u3002&#064;timestamp \u5b57\u6bb5\u4e5f\u4f1a\u88ab\u7528\u4f5c\u7d22\u5f15\u6392\u5e8f\u5b57\u6bb5&#xff0c;\u5e76\u8ba9\u6700\u8fd1\u7684\u65e5\u5fd7\u6761\u76ee\u6392\u5728\u6700\u524d\u9762&#xff0c;\u4ece\u800c\u63d0\u9ad8\u9488\u5bf9\u8fd1\u671f\u6570\u636e\u7684\u67e5\u8be2\u6027\u80fd\u3002<\/p>\n<p>columnar \u7d22\u5f15\u6a21\u5f0f\u9ed8\u8ba4\u4e0d\u4f1a\u542f\u7528\u7d22\u5f15\u6392\u5e8f\u3002\u5982\u679c\u4f60\u4ece\u4e0d\u540c\u7684 agent \u6536\u96c6\u65e5\u5fd7&#xff0c;\u90a3\u4e48\u6309\u7167 agent ID \u548c\u65f6\u95f4\u6233\u8fdb\u884c\u6392\u5e8f\u53ef\u80fd\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9&#xff1a;<\/p>\n<p>PUT my-index<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;columnar&#034;,<br \/>\n    &#034;sort.field&#034;: [ &#034;agent.id&#034;, &#034;&#064;timestamp&#034; ],<br \/>\n    &#034;sort.order&#034;: [ &#034;asc&#034;, &#034;desc&#034; ]<br \/>\n  }<br \/>\n} <\/p>\n<p>\u5982\u679c\u67e5\u8be2\u5ef6\u8fdf\u6bd4\u5b58\u50a8\u6548\u7387\u66f4\u91cd\u8981&#xff0c;\u90a3\u4e48\u4ec5\u6309 &#064;timestamp \u6392\u5e8f\u53ef\u80fd\u4f1a\u63d0\u9ad8\u67e5\u8be2\u54cd\u5e94\u65f6\u95f4&#xff1a;<\/p>\n<p>PUT my-logs-index<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;logsdb_columnar&#034;,<br \/>\n    &#034;sort.field&#034;: [ &#034;&#064;timestamp&#034; ],<br \/>\n    &#034;sort.order&#034;: [ &#034;desc&#034; ]<br \/>\n  }<br \/>\n} <\/p>\n<h2>\u52a8\u6001\u6620\u5c04<\/h2>\n<p>\u5728\u5217\u5f0f\u6a21\u5f0f\u4e0b&#xff0c;\u9759\u6001\u6620\u5c04\u4e2d\u672a\u5f15\u7528\u7684\u5b57\u6bb5\u4f1a\u6309\u7167\u4ee5\u4e0b\u65b9\u5f0f\u8fdb\u884c\u52a8\u6001\u6620\u5c04&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u6574\u6570\u6620\u5c04\u4e3a long \u5b57\u6bb5\u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5c0f\u6570\u6620\u5c04\u4e3a double \u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b57\u7b26\u4e32\u6620\u5c04\u4e3a keyword \u5b57\u6bb5\u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u8c61\u548c\u6570\u7ec4\u4f1a\u6620\u5c04\u4e3a\u4e00\u4e2a\u6216\u591a\u4e2a\u53f6\u5b50\u5b57\u6bb5&#xff08;\u5177\u4f53\u53d6\u51b3\u4e8e\u672a\u6620\u5c04\u5b57\u6bb5\u8def\u5f84\u7684\u6570\u91cf&#xff09;\u3002\u5217\u5f0f\u6a21\u5f0f\u4e2d\u7684\u6620\u5c04\u4f1a\u88ab\u6241\u5e73\u5316&#xff0c;\u8fd9\u540c\u6837\u9002\u7528\u4e8e\u672a\u6620\u5c04\u7684\u5bf9\u8c61\u3002\u672a\u6620\u5c04\u5bf9\u8c61\u4e0b\u7684\u6bcf\u4e2a\u53f6\u5b50\u5b57\u6bb5\u90fd\u4f1a\u88ab\u6620\u5c04\u4e3a\u72ec\u7acb\u7684\u53f6\u5b50\u5b57\u6bb5\u3002\u6620\u5c04\u4e2d\u4e0d\u4f1a\u6dfb\u52a0\u4efb\u4f55\u5bf9\u8c61\u5b57\u6bb5\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u52a8\u6001\u6620\u5c04\u7684\u5b57\u6bb5\u9ed8\u8ba4\u542f\u7528 doc values&#xff0c;\u5e76\u5173\u95ed\u7d22\u5f15&#xff0c;\u8fd9\u7b26\u5408\u5217\u5f0f\u5b58\u50a8\u901a\u8fc7\u4f7f\u7528 doc values \u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u4ec5\u5b58\u50a8\u4e00\u6b21\u7684\u8bbe\u8ba1\u7406\u5ff5\u3002<\/p>\n<p>\u52a8\u6001\u6620\u5c04\u884c\u4e3a\u7531 dynamic \u914d\u7f6e\u53c2\u6570\u63a7\u5236&#xff0c;\u8be5\u53c2\u6570\u53ef\u4ee5\u8bbe\u7f6e\u4e3a&#xff1a;<\/p>\n<ul>\n<li>\n<p>true&#xff08;\u9ed8\u8ba4&#xff09;&#xff1a;\u542f\u7528\u524d\u8ff0\u6bb5\u843d\u4e2d\u63cf\u8ff0\u7684\u52a8\u6001\u6620\u5c04\u884c\u4e3a\u3002<\/p>\n<\/li>\n<li>\n<p>false&#xff1a;\u672a\u6620\u5c04\u5b57\u6bb5\u4e0d\u4f1a\u88ab\u6620\u5c04\u6216\u5b58\u50a8\u3002\u672a\u6620\u5c04\u5b57\u6bb5\u4e2d\u7684\u6570\u636e\u4f1a\u4e22\u5931\u3002<\/p>\n<\/li>\n<li>\n<p>strict&#xff1a;\u5305\u542b\u672a\u6620\u5c04\u5b57\u6bb5\u7684\u6587\u6863\u4e0d\u4f1a\u88ab\u5efa\u7acb\u7d22\u5f15&#xff0c;\u800c\u662f\u4ea7\u751f\u7d22\u5f15\u9519\u8bef\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u8bf7\u6ce8\u610f&#xff0c;runtime \u9009\u9879\u5728\u5217\u5f0f\u6a21\u5f0f\u4e0b\u4e0d\u53d7\u652f\u6301\u3002<\/p>\n<p>\u8b66\u544a<\/p>\n<p>\u5982\u679c\u4f60\u5c06 &#034;dynamic&#034;: false \u914d\u7f6e\u4e3a false&#xff0c;\u90a3\u4e48\u53ea\u6709\u5728\u6620\u5c04\u4e2d\u660e\u786e\u914d\u7f6e\u7684\u5b57\u6bb5\u624d\u4f1a\u88ab\u5b58\u50a8\u3002\u6620\u5c04\u4e2d\u672a\u660e\u786e\u914d\u7f6e\u7684\u5b57\u6bb5\u4e0d\u4f1a\u88ab\u5b58\u50a8&#xff0c;\u56e0\u6b64\u4f1a\u4e22\u5931\u3002<\/p>\n<\/p>\n<h2>\u81ea\u52a8\u6241\u5e73\u5316<\/h2>\n<p>\u5982\u679c\u4f7f\u7528\u5217\u5f0f\u6a21\u5f0f&#xff0c;\u6620\u5c04\u59cb\u7ec8\u4f1a\u88ab\u6241\u5e73\u5316\u3002\u5728\u5b9a\u4e49\u6620\u5c04\u65f6&#xff0c;object \u548c passthrough \u5b57\u6bb5\u6620\u5c04\u5668\u4f1a\u88ab\u79fb\u9664&#xff0c;\u5e76\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u8def\u5f84\u521b\u5efa\u53f6\u5b50\u5b57\u6bb5\u6620\u5c04\u3002\u7d22\u5f15\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u52a8\u6001\u6620\u5c04\u66f4\u65b0\u4e5f\u91c7\u7528\u76f8\u540c\u7684\u65b9\u5f0f\u3002<\/p>\n<p>\u5728\u8fdb\u884c object \u6241\u5e73\u5316\u65f6&#xff0c;enabled \u548c dynamic \u8bbe\u7f6e\u4f1a\u88ab\u4fdd\u7559\u5e76\u5206\u522b\u8fdb\u884c\u8ddf\u8e2a\u3002\u5bf9\u4e8e passthrough \u5b57\u6bb5\u4e5f\u662f\u5982\u6b64&#xff0c;\u540c\u65f6\u8fd8\u4f1a\u4fdd\u7559\u5176 priority \u8bbe\u7f6e\u3002<\/p>\n<p>\u4f8b\u5982&#xff0c;\u7ed9\u5b9a\u4e00\u4e2a\u5305\u542b attributes \u5bf9\u8c61&#xff08;dynamic: false&#xff09;\u548c labels passthrough \u5b57\u6bb5&#xff08;priority: 10&#xff09;\u7684\u6620\u5c04&#xff1a;<\/p>\n<p>PUT my-index<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;columnar&#034;<br \/>\n  },<br \/>\n  &#034;mappings&#034;: {<br \/>\n    &#034;properties&#034;: {<br \/>\n      &#034;attributes&#034;: {<br \/>\n        &#034;type&#034;: &#034;object&#034;,<br \/>\n        &#034;dynamic&#034;: false,<br \/>\n        &#034;properties&#034;: {<br \/>\n          &#034;host&#034;: { &#034;type&#034;: &#034;keyword&#034; },<br \/>\n          &#034;ip&#034;:   { &#034;type&#034;: &#034;ip&#034; }<br \/>\n        }<br \/>\n      },<br \/>\n      &#034;labels&#034;: {<br \/>\n        &#034;type&#034;: &#034;passthrough&#034;,<br \/>\n        &#034;priority&#034;: 10,<br \/>\n        &#034;properties&#034;: {<br \/>\n          &#034;env&#034;: { &#034;type&#034;: &#034;keyword&#034; }<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>\u5904\u7406\u540e\u7684\u6620\u5c04\u663e\u793a&#xff0c;object \u6620\u5c04\u5668\u5df2\u88ab\u79fb\u9664&#xff0c;\u5176\u8bbe\u7f6e\u88ab\u8bb0\u5f55\u5728 prefix_properties \u4e0b\u3002\u4f8b\u5982&#xff0c;GET my-index\/_mapping \u8fd4\u56de&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;my-index&#034;: {<br \/>\n    &#034;mappings&#034;: {<br \/>\n      &#034;prefix_properties&#034;: {<br \/>\n        &#034;attributes&#034;: {<br \/>\n          &#034;dynamic&#034;: &#034;false&#034;<br \/>\n        },<br \/>\n        &#034;labels&#034;: {<br \/>\n          &#034;passthrough&#034;: 10<br \/>\n        }<br \/>\n      },<br \/>\n      &#034;properties&#034;: {<br \/>\n        &#034;attributes.host&#034;: { &#034;type&#034;: &#034;keyword&#034; },<br \/>\n        &#034;attributes.ip&#034;:   { &#034;type&#034;: &#034;ip&#034; },<br \/>\n        &#034;labels.env&#034;:      { &#034;type&#034;: &#034;keyword&#034; }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>attributes \u548c labels object \u6620\u5c04\u5668\u5df2\u4ece properties \u4e2d\u79fb\u9664&#xff1b;\u5176\u4e2d\u53ea\u4fdd\u7559\u6241\u5e73\u5316\u7684\u70b9\u53f7\u8def\u5f84\u53f6\u5b50\u5b57\u6bb5\u3002attributes \u4e2d\u7684 dynamic: false \u88ab\u4fdd\u7559\u5728 prefix_properties.attributes.dynamic \u4e0b&#xff0c;\u4ece\u800c\u963b\u6b62\u7d22\u5f15\u65f6\u81ea\u52a8\u4e3a attributes.* \u4e0b\u7684\u65b0\u5b57\u6bb5\u521b\u5efa\u6620\u5c04\u3002labels \u4e2d\u7684 priority: 10 \u88ab\u4fdd\u7559\u5728 prefix_properties.labels.passthrough \u4e0b\u3002<\/p>\n<\/p>\n<h3>\u5217\u5f0f _source<\/h3>\n<p>\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u4e0d\u4f1a\u5728\u78c1\u76d8\u4e0a\u5b58\u50a8\u539f\u59cb JSON _source\u3002\u652f\u6301\u4e24\u79cd _source \u6a21\u5f0f&#xff1a;<\/p>\n<\/p>\n<p>\u5408\u6210\u5217\u5f0f _source<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u67e5\u8be2\u65f6\u4ece doc values \u91cd\u5efa\u6241\u5e73\u5316\u7684 _source \u8868\u793a\u3002\u5408\u6210\u5217\u5f0f _source \u9700\u8981\u76f8\u5e94\u7684\u8bb8\u53ef\u8bc1\u3002\u66f4\u591a\u4fe1\u606f\u8bf7\u53c2\u9605\u5408\u6210 _source\u3002<\/p>\n<p>\u5217\u5f0f\u5b58\u50a8 _source<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u7d22\u5f15\u65f6\u751f\u6210\u5217\u5f0f _source \u8868\u793a&#xff0c;\u5e76\u5c06\u5176\u4f5c\u4e3a doc values \u5b58\u50a8\u5728\u78c1\u76d8\u4e0a\u3002\u5f53\u672a\u83b7\u5f97\u5408\u6210\u5217\u5f0f _source \u7684\u8bb8\u53ef\u8bc1\u65f6\u4f1a\u81ea\u52a8\u4f7f\u7528\u8be5\u6a21\u5f0f&#xff0c;\u4e5f\u53ef\u4ee5\u663e\u5f0f\u914d\u7f6e\u5b83&#xff0c;\u4ee5\u52a0\u5feb _source \u7684\u68c0\u7d22\u901f\u5ea6\u3002\u66f4\u591a\u4fe1\u606f\u8bf7\u53c2\u9605\u5217\u5f0f source\u3002<\/p>\n<\/p>\n<h2>\u9650\u5236<\/h2>\n<p>\u4ee5\u4e0b\u529f\u80fd\u5728\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u4e0b\u4e0d\u53d7\u652f\u6301&#xff1a;<\/p>\n<ul>\n<li>\n<p>Nested \u5b57\u6bb5\u7c7b\u578b&#xff1a;\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u4ee5\u6709\u9650\u7684\u65b9\u5f0f\u652f\u6301 nested \u5b57\u6bb5\u7c7b\u578b\u3002\u4e0d\u652f\u6301\u5d4c\u5957 nested \u5b57\u6bb5\u7c7b\u578b\u3002<\/p>\n<\/li>\n<li>\n<p>\u6620\u5c04\u7ea7\u522b\u7684 runtime \u5b57\u6bb5&#xff1a;\u4e0d\u5141\u8bb8\u5728\u7d22\u5f15\u6620\u5c04\u4e2d\u5b9a\u4e49 runtime \u5b57\u6bb5\u3002\u4ecd\u7136\u53ef\u4ee5\u5728\u5355\u72ec\u7684\u641c\u7d22\u8bf7\u6c42\u4e2d\u5b9a\u4e49 runtime \u5b57\u6bb5\u3002<\/p>\n<\/li>\n<li>\n<p>\u5173\u95ed doc values&#xff1a;\u6620\u5c04\u5b57\u6bb5\u65e0\u6cd5\u5173\u95ed doc values\u3002\u5c06 doc_values \u8bbe\u7f6e\u4e3a false \u4f1a\u5bfc\u81f4\u6620\u5c04\u9519\u8bef\u3002\u552f\u4e00\u7684\u4f8b\u5916\u662f\u591a\u5b57\u6bb5&#xff08;multi-fields&#xff09;&#xff0c;\u56e0\u4e3a\u901a\u5e38\u5e0c\u671b\u53ea\u4e3a\u5176\u4e2d\u4e00\u4e2a\u5b57\u6bb5\u5b58\u50a8 doc values&#xff0c;\u5e76\u4e3a\u5176\u4ed6\u5b57\u6bb5\u4f7f\u7528\u4e0d\u540c\u7684\u7d22\u5f15\u914d\u7f6e\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e0d\u517c\u5bb9\u7684\u5b57\u6bb5\u7c7b\u578b&#xff1a;\u4e0d\u652f\u6301\u4e0d\u652f\u6301 doc values \u7684\u5b57\u6bb5\u7c7b\u578b&#xff0c;\u4f8b\u5982 search_as_you_type\u3002<\/p>\n<\/li>\n<li>\n<p>\u5173\u95ed _source&#xff1a;\u4e0d\u5141\u8bb8\u8bbe\u7f6e &#034;_source&#034;: {&#034;enabled&#034;: false}\u3002<\/p>\n<\/li>\n<li>\n<p>\u5b58\u50a8\u578b source \u6a21\u5f0f&#xff1a;\u4e0d\u652f\u6301\u4f20\u7edf\u7684 stored source \u6a21\u5f0f&#xff1b;\u4ec5\u652f\u6301 synthetic columnar \u548c columnar stored \u6a21\u5f0f\u3002\u8bf7\u53c2\u9605\u5217\u5f0f _source\u3002<\/p>\n<\/li>\n<li>\n<p>dynamic: false \u548c enabled: false&#xff1a;\u8fd9\u4e24\u79cd\u8bbe\u7f6e\u90fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002\u5728\u5bf9\u8c61\u4e0a\u8bbe\u7f6e dynamic: false \u4f1a\u963b\u6b62\u5b58\u50a8\u672a\u6620\u5c04\u7684\u5b50\u5b57\u6bb5&#xff1b;\u8fd9\u4e9b\u5b57\u6bb5\u7684\u6570\u636e\u5c06\u6c38\u4e45\u4e22\u5931\u3002\u8bbe\u7f6e enabled: false \u4f1a\u5ffd\u7565\u6574\u4e2a\u5bf9\u8c61\u5b50\u6811&#xff1b;\u5176\u4e2d\u7684\u6570\u636e\u5c06\u6c38\u4e45\u4e22\u5931\u3002<\/p>\n<\/li>\n<li>\n<p>\u9ed8\u8ba4\u67e5\u8be2\u5b57\u6bb5&#xff1a;\u5728\u5217\u5f0f\u6a21\u5f0f\u4e0b&#xff0c;index.query.default_field \u7d22\u5f15\u8bbe\u7f6e\u9ed8\u8ba4\u53ea\u5305\u542b\u5df2\u5efa\u7acb\u7d22\u5f15\u7684\u5b57\u6bb5&#xff08;\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u57fa\u4e8e\u6587\u672c\u7684\u5b57\u6bb5\u4f1a\u5efa\u7acb\u7d22\u5f15&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h2>\u5217\u5f0f source<\/h2>\n<p>\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u4f7f\u7528\u5217\u5f0f source\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u8fd9\u4e9b\u5185\u5bb9\u4f1a\u5728\u67e5\u8be2\u65f6\u6839\u636e doc values \u52a8\u6001\u751f\u6210\u3002\u4f46\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528 columnar_stored source \u6a21\u5f0f&#xff0c;\u5728\u7d22\u5f15\u65f6\u5c06\u8fd9\u4e9b\u5185\u5bb9\u5b58\u50a8\u5728\u78c1\u76d8\u4e0a\u3002<\/p>\n<p>\u5bf9\u4e8e\u9700\u8981\u83b7\u53d6\u7d22\u5f15\u4e2d\u5168\u90e8\u6216\u5927\u90e8\u5206\u5b57\u6bb5\u7684\u67e5\u8be2&#xff0c;columnar_stored source \u6a21\u5f0f\u53ef\u80fd\u5f88\u6709\u7528\u3002<\/p>\n<p>\u8981\u4f7f\u7528\u5217\u5f0f\u5b58\u50a8\u7684 source&#xff1a;<\/p>\n<p>PUT my-columnar-index<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;index&#034;: {<br \/>\n      &#034;mode&#034;: &#034;columnar&#034;<br \/>\n    }<br \/>\n  },<br \/>\n  &#034;mappings&#034;: {<br \/>\n    &#034;_source&#034;: {<br \/>\n      &#034;mode&#034;: &#034;columnar_stored&#034;<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>\u5728\u5217\u5f0f\u6a21\u5f0f\u4e0b&#xff0c;\u5b8c\u5168\u5173\u95ed _source&#xff08;&#034;_source&#034;: {&#034;enabled&#034;: false}&#xff09;\u4e0d\u88ab\u5141\u8bb8\u3002<\/p>\n<\/p>\n<h2>\u4e3e\u4f8b \u4e00<\/h2>\n<p>\u4e0b\u9762\u6211\u4eec\u6765\u4f7f\u7528\u4e00\u4e2a\u4f8b\u5b50\u6765\u8fdb\u884c\u8bf4\u660e&#xff1a;<\/p>\n<\/p>\n<h3>\u521b\u5efa\u4e00\u4e2a columnar \u7d22\u5f15<\/h3>\n<p>PUT products<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;columnar&#034;<br \/>\n  },<br \/>\n  &#034;mappings&#034;: {<br \/>\n    &#034;properties&#034;: {<br \/>\n      &#034;name&#034;: {<br \/>\n        &#034;type&#034;: &#034;keyword&#034;<br \/>\n      },<br \/>\n      &#034;category&#034;: {<br \/>\n        &#034;type&#034;: &#034;keyword&#034;<br \/>\n      },<br \/>\n      &#034;price&#034;: {<br \/>\n        &#034;type&#034;: &#034;double&#034;<br \/>\n      },<br \/>\n      &#034;in_stock&#034;: {<br \/>\n        &#034;type&#034;: &#034;boolean&#034;<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>\u91cd\u8981\u7684\u662f&#xff1a;<\/p>\n<p>&#034;settings&#034;: {<br \/>\n  &#034;mode&#034;: &#034;columnar&#034;<br \/>\n} <\/p>\n<p>mode \u5fc5\u987b\u5728\u521b\u5efa\u7d22\u5f15\u65f6\u6307\u5b9a&#xff1b;\u4e4b\u540e\u65e0\u6cd5\u66f4\u6539\u3002<\/p>\n<p>\u53e6\u5916\u8bf7\u6ce8\u610f&#xff0c;\u8fd9\u4e9b\u5b57\u6bb5\u90fd\u662f\u663e\u5f0f\u6620\u5c04\u7684\u3002\u5728 columnar \u6a21\u5f0f\u4e0b&#xff0c;\u975e\u6587\u672c\u5b57\u6bb5\u4f1a\u4f5c\u4e3a doc values \u5b58\u50a8&#xff0c;\u5e76\u4e14\u9ed8\u8ba4\u4e0d\u4f1a\u5efa\u7acb\u7d22\u5f15&#xff0c;\u8fd9\u662f\u5217\u5f0f\u8bbe\u8ba1\u7684\u4e00\u90e8\u5206\u3002<\/p>\n<\/p>\n<h3>\u5199\u5165\u4e24\u4e2a\u6587\u6863<\/h3>\n<p>PUT products\/_doc\/1<br \/>\n{<br \/>\n  &#034;name&#034;: &#034;MacBook Pro&#034;,<br \/>\n  &#034;category&#034;: &#034;laptop&#034;,<br \/>\n  &#034;price&#034;: 2499.99,<br \/>\n  &#034;in_stock&#034;: true<br \/>\n}<\/p>\n<p>PUT products\/_doc\/2<br \/>\n{<br \/>\n  &#034;name&#034;: &#034;iPhone 17&#034;,<br \/>\n  &#034;category&#034;: &#034;phone&#034;,<br \/>\n  &#034;price&#034;: 999.99,<br \/>\n  &#034;in_stock&#034;: true<br \/>\n} <\/p>\n<p>\u6b64\u65f6&#xff0c;Elasticsearch \u4e2d\u7684\u5b57\u6bb5\u503c\u5df2\u7ecf\u4ee5\u5217\u5f0f \/ doc values \u8868\u793a\u5f62\u5f0f\u5b58\u5728&#xff0c;\u800c\u4e0d\u662f\u50cf\u4f20\u7edf\u7684 _source \u90a3\u6837\u4ec5\u4fdd\u7559\u539f\u59cb JSON \u6587\u6863\u3002<\/p>\n<\/p>\n<h3>\u641c\u7d22\u7d22\u5f15<\/h3>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>GET products\/_search<br \/>\n{<br \/>\n  &#034;query&#034;: {<br \/>\n    &#034;match_all&#034;: {}<br \/>\n  }<br \/>\n} <\/p>\n<p>\u54cd\u5e94\u7ed3\u679c\u5728\u6982\u5ff5\u4e0a\u5982\u4e0b&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;took&#034;: 46,<br \/>\n  &#034;timed_out&#034;: false,<br \/>\n  &#034;_shards&#034;: {<br \/>\n    &#034;total&#034;: 1,<br \/>\n    &#034;successful&#034;: 1,<br \/>\n    &#034;skipped&#034;: 0,<br \/>\n    &#034;failed&#034;: 0<br \/>\n  },<br \/>\n  &#034;hits&#034;: {<br \/>\n    &#034;total&#034;: {<br \/>\n      &#034;value&#034;: 2,<br \/>\n      &#034;relation&#034;: &#034;eq&#034;<br \/>\n    },<br \/>\n    &#034;max_score&#034;: 1,<br \/>\n    &#034;hits&#034;: [<br \/>\n      {<br \/>\n        &#034;_index&#034;: &#034;products&#034;,<br \/>\n        &#034;_id&#034;: &#034;1&#034;,<br \/>\n        &#034;_score&#034;: 1,<br \/>\n        &#034;_source&#034;: {<br \/>\n          &#034;category&#034;: &#034;laptop&#034;,<br \/>\n          &#034;in_stock&#034;: true,<br \/>\n          &#034;name&#034;: &#034;MacBook Pro&#034;,<br \/>\n          &#034;price&#034;: 2499.99<br \/>\n        }<br \/>\n      },<br \/>\n      {<br \/>\n        &#034;_index&#034;: &#034;products&#034;,<br \/>\n        &#034;_id&#034;: &#034;2&#034;,<br \/>\n        &#034;_score&#034;: 1,<br \/>\n        &#034;_source&#034;: {<br \/>\n          &#034;category&#034;: &#034;phone&#034;,<br \/>\n          &#034;in_stock&#034;: true,<br \/>\n          &#034;name&#034;: &#034;iPhone 17&#034;,<br \/>\n          &#034;price&#034;: 999.99<br \/>\n        }<br \/>\n      }<br \/>\n    ]<br \/>\n  }<br \/>\n} <\/p>\n<h3>\u90a3\u4e48&#xff0c;\u8fd9\u4e2a _source \u662f\u4ece\u54ea\u91cc\u6765\u7684&#xff1f;<\/h3>\n<p>\u8fd9\u6b63\u662f\u6709\u610f\u601d\u7684\u5730\u65b9\u3002<\/p>\n<p>\u5bf9\u4e8e\u666e\u901a\u7684 Elasticsearch \u7d22\u5f15&#xff0c;_source \u672c\u8d28\u4e0a\u5c31\u662f Elasticsearch \u5b58\u50a8\u7684\u539f\u59cb JSON \u6587\u6863\u3002<\/p>\n<p>\u5728 columnar \u6a21\u5f0f\u4e0b&#xff0c;Elasticsearch \u4e0d\u4f1a\u5728\u78c1\u76d8\u4e0a\u5b58\u50a8\u539f\u59cb JSON _source\u3002\u76f8\u53cd&#xff0c;\u5728\u4f7f\u7528\u5408\u6210\u5217\u5f0f _source \u65f6&#xff0c;\u5f53\u4f60\u8bf7\u6c42 _source&#xff0c;Elasticsearch \u4f1a\u6839\u636e doc values \u4e2d\u7684\u5b57\u6bb5\u503c\u91cd\u65b0\u6784\u5efa _source\u3002<\/p>\n<p>\u6240\u4ee5\u4ece\u6982\u5ff5\u4e0a\u6765\u8bf4&#xff1a;<\/p>\n<p>Indexing<br \/>\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<\/p>\n<p>JSON document<br \/>\n     \u2502<br \/>\n     \u251c\u2500\u2500 name       \u2192 doc values<br \/>\n     \u251c\u2500\u2500 category   \u2192 doc values<br \/>\n     \u251c\u2500\u2500 price      \u2192 doc values<br \/>\n     \u2514\u2500\u2500 in_stock   \u2192 doc values <\/p>\n<p>\u7136\u540e\u5f53\u4f60\u8fdb\u884c\u641c\u7d22\u65f6&#xff1a;<\/p>\n<p>Search<br \/>\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<\/p>\n<p>doc values<br \/>\n     \u2502<br \/>\n     \u251c\u2500\u2500 name       \u2192 &#034;MacBook Pro&#034;<br \/>\n     \u251c\u2500\u2500 category   \u2192 &#034;laptop&#034;<br \/>\n     \u251c\u2500\u2500 price      \u2192 2499.99<br \/>\n     \u2514\u2500\u2500 in_stock   \u2192 true<br \/>\n     \u2502<br \/>\n     \u25bc<br \/>\nsynthetic _source<br \/>\n     \u2502<br \/>\n     \u25bc<br \/>\n{<br \/>\n  &#034;name&#034;: &#034;MacBook Pro&#034;,<br \/>\n  &#034;category&#034;: &#034;laptop&#034;,<br \/>\n  &#034;price&#034;: 2499.99,<br \/>\n  &#034;in_stock&#034;: true<br \/>\n} <\/p>\n<p>\u6240\u4ee5&#xff0c;\u5bf9\u7528\u6237\u6765\u8bf4&#xff0c;\u641c\u7d22\u54cd\u5e94\u4e2d\u663e\u793a\u7684 _source \u770b\u8d77\u6765\u5c31\u50cf\u666e\u901a\u7684 _source&#xff0c;\u4f46\u5728\u5185\u90e8&#xff0c;\u5b83\u662f\u6839\u636e\u5217\u5f0f\u6570\u636e\u91cd\u65b0\u6784\u5efa\u7684\u3002<\/p>\n<\/p>\n<h3>\u4f60\u4e5f\u53ef\u4ee5\u53ea\u8bf7\u6c42\u7279\u5b9a\u5b57\u6bb5<\/h3>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>GET products\/_search<br \/>\n{<br \/>\n  &#034;_source&#034;: [<br \/>\n    &#034;name&#034;,<br \/>\n    &#034;price&#034;<br \/>\n  ],<br \/>\n  &#034;query&#034;: {<br \/>\n    &#034;match_all&#034;: {}<br \/>\n  }<br \/>\n} <\/p>\n<p>\u4f60\u4f1a\u5f97\u5230&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;hits&#034;: {<br \/>\n    &#034;hits&#034;: [<br \/>\n      {<br \/>\n        &#034;_id&#034;: &#034;1&#034;,<br \/>\n        &#034;_source&#034;: {<br \/>\n          &#034;name&#034;: &#034;MacBook Pro&#034;,<br \/>\n          &#034;price&#034;: 2499.99<br \/>\n        }<br \/>\n      },<br \/>\n      {<br \/>\n        &#034;_id&#034;: &#034;2&#034;,<br \/>\n        &#034;_source&#034;: {<br \/>\n          &#034;name&#034;: &#034;iPhone 17&#034;,<br \/>\n          &#034;price&#034;: 999.99<br \/>\n        }<br \/>\n      }<br \/>\n    ]<br \/>\n  }<br \/>\n} <\/p>\n<p>\u540c\u6837&#xff0c;\u8fd9\u4e9b\u503c\u53ef\u4ee5\u6839\u636e\u5217\u5f0f\u8868\u793a\u5f62\u5f0f\u91cd\u65b0\u6784\u5efa\u3002<\/p>\n<\/p>\n<h3>\u90a3\u4e48 columnar_stored \u5462&#xff1f;<\/h3>\n<p>\u4f60\u53ef\u4ee5\u663e\u5f0f\u9009\u62e9\u53e6\u4e00\u79cd _source \u6a21\u5f0f&#xff1a;<\/p>\n<p>PUT products_stored<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;columnar&#034;,<br \/>\n    &#034;index.mapping.source.mode&#034;: &#034;columnar_stored&#034;<br \/>\n  },<br \/>\n  &#034;mappings&#034;: {<br \/>\n    &#034;properties&#034;: {<br \/>\n      &#034;name&#034;: {<br \/>\n        &#034;type&#034;: &#034;keyword&#034;<br \/>\n      },<br \/>\n      &#034;category&#034;: {<br \/>\n        &#034;type&#034;: &#034;keyword&#034;<br \/>\n      },<br \/>\n      &#034;price&#034;: {<br \/>\n        &#034;type&#034;: &#034;double&#034;<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>\u533a\u522b\u5728\u4e8e&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u5f0f_source \u7684\u83b7\u53d6\u65b9\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>columnar &#043; synthetic source<\/td>\n<td>\u5728\u67e5\u8be2\u65f6\u6839\u636e doc values \u91cd\u65b0\u6784\u5efa<\/td>\n<\/tr>\n<tr>\n<td>columnar &#043; columnar_stored<\/td>\n<td>\u5217\u5f0f _source \u5728\u7d22\u5f15\u65f6\u751f\u6210\u5e76\u5b58\u50a8\u5728\u78c1\u76d8\u4e0a<\/td>\n<\/tr>\n<tr>\n<td>\u4f20\u7edf\u7d22\u5f15<\/td>\n<td>\u5b58\u50a8\u539f\u59cb JSON _source<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Elastic \u7684\u6587\u6863\u8bf4\u660e&#xff0c;columnar \u6a21\u5f0f\u4e0d\u4f1a\u5b58\u50a8\u539f\u59cb JSON _source&#xff1b;\u5b83\u652f\u6301\u5408\u6210\u5217\u5f0f _source \u548c\u5217\u5f0f\u5b58\u50a8 _source\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u5728\u4e0a\u9762\u7684\u9650\u5236\u4e2d\u5199\u9053&#xff1a;<\/p>\n<p>Turning off _source:<br \/>\n&#034;_source&#034;: {<br \/>\n  &#034;enabled&#034;: false<br \/>\n} <\/p>\n<p>\u5728\u5217\u5f0f\u6a21\u5f0f\u4e0b&#xff0c;\u4e0d\u88ab\u5141\u8bb8\u3002\u540c\u6837&#xff0c;\u4f20\u7edf\u7684 stored source \u6a21\u5f0f\u4e5f\u4e0d\u53d7\u652f\u6301\u3002<\/p>\n<\/p>\n<h2>\u4e3e\u4f8b \u4e8c<\/h2>\n<p>\u4e00\u4e2a nested\/object \u793a\u4f8b\u53ef\u4ee5\u66f4\u6e05\u695a\u5730\u8bf4\u660e\u8fd9\u79cd\u5dee\u5f02\u3002\u4e00\u4e2a\u91cd\u8981\u7ec6\u8282\u662f&#xff0c;\u5408\u6210 _source \u53ef\u80fd\u65e0\u6cd5\u9010\u5b57\u8282\u8fd8\u539f\u539f\u59cb JSON&#xff1a;\u5bf9\u8c61\u6570\u7ec4\u53ef\u4ee5\u6839\u636e\u5217\u5f0f\u5b57\u6bb5\u503c\u91cd\u65b0\u6784\u5efa&#xff0c;\u800c\u6700\u7ec8\u751f\u6210\u7684\u7ed3\u6784\u6216\u987a\u5e8f\u53ef\u80fd\u4e0e\u6700\u521d\u5efa\u7acb\u7d22\u5f15\u65f6\u6709\u6240\u4e0d\u540c\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u5177\u4f53\u793a\u4f8b\u3002<\/p>\n<\/p>\n<h3>\u521b\u5efa\u4e00\u4e2a columnar \u7d22\u5f15<\/h3>\n<p>PUT products<br \/>\n{<br \/>\n  &#034;settings&#034;: {<br \/>\n    &#034;mode&#034;: &#034;columnar&#034;<br \/>\n  },<br \/>\n  &#034;mappings&#034;: {<br \/>\n    &#034;properties&#034;: {<br \/>\n      &#034;name&#034;: {<br \/>\n        &#034;type&#034;: &#034;keyword&#034;<br \/>\n      },<br \/>\n      &#034;tags&#034;: {<br \/>\n        &#034;type&#034;: &#034;keyword&#034;<br \/>\n      },<br \/>\n      &#034;specs&#034;: {<br \/>\n        &#034;properties&#034;: {<br \/>\n          &#034;color&#034;: {<br \/>\n            &#034;type&#034;: &#034;keyword&#034;<br \/>\n          },<br \/>\n          &#034;weight&#034;: {<br \/>\n            &#034;type&#034;: &#034;double&#034;<br \/>\n          }<br \/>\n        }<br \/>\n      },<br \/>\n      &#034;offers&#034;: {<br \/>\n        &#034;properties&#034;: {<br \/>\n          &#034;seller&#034;: {<br \/>\n            &#034;type&#034;: &#034;keyword&#034;<br \/>\n          },<br \/>\n          &#034;price&#034;: {<br \/>\n            &#034;type&#034;: &#034;double&#034;<br \/>\n          }<br \/>\n        }<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n} <\/p>\n<p>\u8fd9\u91cc\u503c\u5f97\u5173\u6ce8\u7684\u5b57\u6bb5\u662f&#xff1a;<\/p>\n<p>specs.color<br \/>\nspecs.weight<br \/>\noffers.seller<br \/>\noffers.price <\/p>\n<p>\u5b83\u4eec\u4f1a\u88ab\u8868\u793a\u4e3a\u72ec\u7acb\u7684\u5217\u5f0f\u5b57\u6bb5&#xff0c;\u800c\u4e0d\u662f\u5b58\u50a8\u539f\u59cb JSON \u7ed3\u6784\u3002<\/p>\n<\/p>\n<h3>\u4f7f\u7528 object \u548c\u5bf9\u8c61\u6570\u7ec4\u7d22\u5f15\u4e00\u4e2a\u6587\u6863<\/h3>\n<p>\u5047\u8bbe\u539f\u59cb\u6587\u6863\u662f&#xff1a;<\/p>\n<p>PUT products\/_doc\/1<br \/>\n{<br \/>\n  &#034;name&#034;: &#034;MacBook Pro&#034;,<br \/>\n  &#034;tags&#034;: [<br \/>\n    &#034;laptop&#034;,<br \/>\n    &#034;apple&#034;,<br \/>\n    &#034;premium&#034;<br \/>\n  ],<br \/>\n  &#034;specs&#034;: {<br \/>\n    &#034;color&#034;: &#034;silver&#034;,<br \/>\n    &#034;weight&#034;: 1.6<br \/>\n  },<br \/>\n  &#034;offers&#034;: [<br \/>\n    {<br \/>\n      &#034;seller&#034;: &#034;Amazon&#034;,<br \/>\n      &#034;price&#034;: 2399<br \/>\n    },<br \/>\n    {<br \/>\n      &#034;seller&#034;: &#034;BestBuy&#034;,<br \/>\n      &#034;price&#034;: 2449<br \/>\n    }<br \/>\n  ]<br \/>\n} <\/p>\n<p>\u539f\u59cb JSON \u5982\u4e0b&#xff1a;<\/p>\n<p>products<br \/>\n\u251c\u2500\u2500 name: &#034;MacBook Pro&#034;<br \/>\n\u251c\u2500\u2500 tags<br \/>\n\u2502   \u251c\u2500\u2500 &#034;laptop&#034;<br \/>\n\u2502   \u251c\u2500\u2500 &#034;apple&#034;<br \/>\n\u2502   \u2514\u2500\u2500 &#034;premium&#034;<br \/>\n\u251c\u2500\u2500 specs<br \/>\n\u2502   \u251c\u2500\u2500 color: &#034;silver&#034;<br \/>\n\u2502   \u2514\u2500\u2500 weight: 1.6<br \/>\n\u2514\u2500\u2500 offers<br \/>\n    \u251c\u2500\u2500 { seller: &#034;Amazon&#034;,  price: 2399 }<br \/>\n    \u2514\u2500\u2500 { seller: &#034;BestBuy&#034;, price: 2449 } <\/p>\n<h3>\u5217\u5f0f\u5b58\u50a8\u770b\u5230\u7684\u662f\u4ec0\u4e48&#xff1f;<\/h3>\n<p>\u4ece\u6982\u5ff5\u4e0a\u6765\u8bf4&#xff0c;\u8fd9\u4e9b\u503c\u4f1a\u88ab\u6241\u5e73\u5316\u4e3a\u5217&#xff1a;<\/p>\n<p>name          \u2192 &#034;MacBook Pro&#034;<\/p>\n<p>tags          \u2192 [&#034;laptop&#034;, &#034;apple&#034;, &#034;premium&#034;]<\/p>\n<p>specs.color   \u2192 &#034;silver&#034;<br \/>\nspecs.weight  \u2192 1.6<\/p>\n<p>offers.seller \u2192 [&#034;Amazon&#034;, &#034;BestBuy&#034;]<br \/>\noffers.price  \u2192 [2399, 2449] <\/p>\n<p>\u8fd9\u6b63\u662f\u5173\u952e\u533a\u522b\u3002<\/p>\n<p>\u5217\u5f0f\u8868\u793a\u4ece\u6839\u672c\u4e0a\u5904\u7406\u7684\u662f\u5b57\u6bb5 \/ \u503c\u5217&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<p>offers.seller<br \/>\noffers.price <\/p>\n<p>\u800c\u4e0d\u662f\u4fdd\u7559\u539f\u59cb\u7684 JSON \u6811\u7ed3\u6784&#xff1a;<\/p>\n<p>&#034;offers&#034;: [<br \/>\n  {<br \/>\n    &#034;seller&#034;: &#034;Amazon&#034;,<br \/>\n    &#034;price&#034;: 2399<br \/>\n  },<br \/>\n  {<br \/>\n    &#034;seller&#034;: &#034;BestBuy&#034;,<br \/>\n    &#034;price&#034;: 2449<br \/>\n  }<br \/>\n] <\/p>\n<p>\u5bf9\u4e8e\u666e\u901a\u7684 object \u5b57\u6bb5&#xff0c;Elasticsearch \u4f1a\u5c06\u8be5\u5bf9\u8c61\u89c6\u4e3a\u5b57\u6bb5\u5c42\u7ea7\u7ed3\u6784\u3002\u5b83\u4e0d\u662f nested \u5b57\u6bb5&#xff0c;\u56e0\u6b64&#xff0c;\u5728\u540c\u4e00\u4e2a\u6570\u7ec4\u5143\u7d20\u4e2d\u4e0d\u540c\u5b57\u6bb5\u7684\u503c\u4e4b\u95f4\u7684\u5173\u8054\u5173\u7cfb\u4e0d\u4f1a\u88ab\u4fdd\u7559\u7528\u4e8e\u67e5\u8be2\u3002<\/p>\n<p>\u4f8b\u5982&#xff1a;<\/p>\n<p>&#034;offers&#034;: [<br \/>\n  {<br \/>\n    &#034;seller&#034;: &#034;Amazon&#034;,<br \/>\n    &#034;price&#034;: 2399<br \/>\n  },<br \/>\n  {<br \/>\n    &#034;seller&#034;: &#034;BestBuy&#034;,<br \/>\n    &#034;price&#034;: 2449<br \/>\n  }<br \/>\n] <\/p>\n<p>\u5728\u641c\u7d22\u5c42\u9762&#xff0c;\u5b83\u5b9e\u9645\u4e0a\u4f1a\u88ab\u8868\u793a\u4e3a&#xff1a;<\/p>\n<p>offers.seller &#061; [&#034;Amazon&#034;, &#034;BestBuy&#034;]<br \/>\noffers.price  &#061; [2399, 2449] <\/p>\n<h3>\u68c0\u7d22\u6587\u6863<\/h3>\n<p>\u73b0\u5728\u8fd0\u884c&#xff1a;<\/p>\n<p>GET products\/_doc\/1<br \/>\n{<br \/>\n  &#034;_index&#034;: &#034;products&#034;,<br \/>\n  &#034;_id&#034;: &#034;1&#034;,<br \/>\n  &#034;_version&#034;: 1,<br \/>\n  &#034;found&#034;: true,<br \/>\n  &#034;_source&#034;: {<br \/>\n    &#034;name&#034;: &#034;MacBook Pro&#034;,<br \/>\n    &#034;offers.price&#034;: [<br \/>\n      2399,<br \/>\n      2449<br \/>\n    ],<br \/>\n    &#034;offers.seller&#034;: [<br \/>\n      &#034;Amazon&#034;,<br \/>\n      &#034;BestBuy&#034;<br \/>\n    ],<br \/>\n    &#034;specs.color&#034;: &#034;silver&#034;,<br \/>\n    &#034;specs.weight&#034;: 1.6,<br \/>\n    &#034;tags&#034;: [<br \/>\n      &#034;laptop&#034;,<br \/>\n      &#034;apple&#034;,<br \/>\n      &#034;premium&#034;<br \/>\n    ]<br \/>\n  }<br \/>\n} <\/p>\n<p>\u8fd9\u770b\u8d77\u6765\u53ef\u80fd\u4e0e\u539f\u59cb\u6587\u6863\u5b8c\u5168\u4e00\u6837\u3002<\/p>\n<p>\u4f46\u5728\u5185\u90e8&#xff0c;\u5bf9\u4e8e columnar \u6a21\u5f0f\u6765\u8bf4&#xff0c;\u5b58\u50a8\u5e76\u968f\u540e\u8fd4\u56de\u7684\u5e76\u4e0d\u662f\u539f\u59cb JSON\u3002Elasticsearch \u4f1a\u6839\u636e\u5217\u5f0f\u8868\u793a\u91cd\u65b0\u6784\u5efa _source\u3002<\/p>\n<\/p>\n<h3>\u5dee\u5f02\u4f1a\u5728\u8fd9\u91cc\u53d8\u5f97\u660e\u663e<\/h3>\n<p>\u8003\u8651\u4e00\u4e2a\u6709\u8da3\u5f97\u591a\u7684\u6587\u6863&#xff1a;<\/p>\n<p>PUT products\/_doc\/2<br \/>\n{<br \/>\n  &#034;name&#034;: &#034;Phone&#034;,<br \/>\n  &#034;tags&#034;: [<br \/>\n    &#034;android&#034;,<br \/>\n    &#034;5g&#034;,<br \/>\n    &#034;phone&#034;<br \/>\n  ],<br \/>\n  &#034;attributes&#034;: [<br \/>\n    {<br \/>\n      &#034;name&#034;: &#034;color&#034;,<br \/>\n      &#034;value&#034;: &#034;black&#034;<br \/>\n    },<br \/>\n    {<br \/>\n      &#034;name&#034;: &#034;memory&#034;,<br \/>\n      &#034;value&#034;: &#034;256GB&#034;<br \/>\n    }<br \/>\n  ]<br \/>\n} <\/p>\n<p>\u539f\u59cb\u7ed3\u6784\u662f&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;attributes&#034;: [<br \/>\n    {<br \/>\n      &#034;name&#034;: &#034;color&#034;,<br \/>\n      &#034;value&#034;: &#034;black&#034;<br \/>\n    },<br \/>\n    {<br \/>\n      &#034;name&#034;: &#034;memory&#034;,<br \/>\n      &#034;value&#034;: &#034;256GB&#034;<br \/>\n    }<br \/>\n  ]<br \/>\n} <\/p>\n<p>\u4f46\u4ece\u6982\u5ff5\u4e0a\u6765\u8bf4&#xff0c;\u5217\u5f0f\u5b57\u6bb5\u662f&#xff1a;<\/p>\n<p>attributes.name  \u2192 [&#034;color&#034;, &#034;memory&#034;]<br \/>\nattributes.value \u2192 [&#034;black&#034;, &#034;256GB&#034;] <\/p>\n<p>\u8bf7\u6ce8\u610f&#xff0c;\u5217\u5f0f\u8868\u793a\u4ece\u6839\u672c\u4e0a\u5e76\u4e0d\u662f\u5982\u4e0b\u5f62\u5f0f&#xff1a;<\/p>\n<p>attribute #1<br \/>\n  name &#061; color<br \/>\n  value &#061; black<\/p>\n<p>attribute #2<br \/>\n  name &#061; memory<br \/>\n  value &#061; 256GB <\/p>\n<p>\u76f8\u53cd&#xff0c;\u5b83\u4f1a\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u5206\u522b\u5b58\u50a8\u72ec\u7acb\u7684\u503c\u3002<\/p>\n<p>\u5f53 Elasticsearch \u91cd\u5efa\u5408\u6210 _source \u65f6&#xff0c;\u53ef\u4ee5\u6839\u636e\u8fd9\u4e9b\u503c\u91cd\u65b0\u6784\u5efa\u5bf9\u8c61 \/ \u6570\u7ec4\u7ed3\u6784\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u8fd4\u56de\u7684 _source \u662f\u5408\u6210\u7684&#xff0c;\u800c\u4e0d\u662f\u539f\u59cb JSON \u5e8f\u5217\u5316\u7ed3\u679c\u3002<\/p>\n<p>GET products\/_doc\/2<\/p>\n<p>{<br \/>\n  &#034;_index&#034;: &#034;products&#034;,<br \/>\n  &#034;_id&#034;: &#034;2&#034;,<br \/>\n  &#034;_version&#034;: 1,<br \/>\n  &#034;found&#034;: true,<br \/>\n  &#034;_source&#034;: {<br \/>\n    &#034;attributes.name&#034;: [<br \/>\n      &#034;color&#034;,<br \/>\n      &#034;memory&#034;<br \/>\n    ],<br \/>\n    &#034;attributes.value&#034;: [<br \/>\n      &#034;black&#034;,<br \/>\n      &#034;256GB&#034;<br \/>\n    ],<br \/>\n    &#034;name&#034;: &#034;Phone&#034;,<br \/>\n    &#034;tags&#034;: [<br \/>\n      &#034;android&#034;,<br \/>\n      &#034;5g&#034;,<br \/>\n      &#034;phone&#034;<br \/>\n    ]<br \/>\n  }<br \/>\n} <\/p>\n<h3>\u4e00\u4e2a\u66f4\u76f4\u89c2\u7684\u793a\u4f8b&#xff1a;\u6570\u7ec4\u53ef\u80fd\u4f1a\u88ab\u91cd\u65b0\u6392\u5e8f<\/h3>\n<p>\u8003\u8651\u4ee5\u4e0b\u793a\u4f8b&#xff1a;<\/p>\n<p>PUT products\/_doc\/3<br \/>\n{<br \/>\n  &#034;tags&#034;: [<br \/>\n    &#034;zebra&#034;,<br \/>\n    &#034;apple&#034;,<br \/>\n    &#034;banana&#034;<br \/>\n  ]<br \/>\n} <\/p>\n<p>\u539f\u59cb _source \u4e2d\u7684\u987a\u5e8f\u662f&#xff1a;<\/p>\n<p>zebra<br \/>\napple<br \/>\nbanana <\/p>\n<p>\u56e0\u4e3a tags \u662f keyword \u5b57\u6bb5&#xff0c;\u800c\u5408\u6210 _source \u662f\u6839\u636e doc values \u91cd\u65b0\u6784\u5efa\u7684&#xff0c;\u6240\u4ee5\u91cd\u65b0\u6784\u5efa\u7684\u6570\u7ec4\u53ef\u80fd\u4f1a\u6309\u7167\u8be5\u5b57\u6bb5\u7684 doc values \u8868\u793a\u8fdb\u884c\u6392\u5e8f&#xff0c;\u800c\u4e0d\u662f\u4fdd\u7559\u539f\u59cb\u6570\u7ec4\u7684\u987a\u5e8f\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u4f60\u53ef\u80fd\u4f1a\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u7ed3\u679c&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;tags&#034;: [<br \/>\n    &#034;apple&#034;,<br \/>\n    &#034;banana&#034;,<br \/>\n    &#034;zebra&#034;<br \/>\n  ]<br \/>\n} <\/p>\n<p>\u800c\u4e0d\u662f&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;tags&#034;: [<br \/>\n    &#034;zebra&#034;,<br \/>\n    &#034;apple&#034;,<br \/>\n    &#034;banana&#034;<br \/>\n  ]<br \/>\n} <\/p>\n<p>\u8fd9\u662f\u4f20\u7edf _source \u4e0e\u5408\u6210 _source \u4e4b\u95f4\u6700\u91cd\u8981\u7684\u533a\u522b\u4e4b\u4e00\u3002<\/p>\n<p>\u503c\u4ecd\u7136\u5b58\u5728&#xff0c;\u4f46\u539f\u59cb JSON \u8868\u793a\u5f62\u5f0f\u4e0d\u4e00\u5b9a\u4f1a\u88ab\u4fdd\u7559\u3002<\/p>\n<\/p>\n<h3>\u5bf9\u8c61\u6570\u7ec4\u4f1a\u53d1\u751f\u4ec0\u4e48&#xff1f;<\/h3>\n<p>\u8fd9\u6b63\u662f\u8fd9\u79cd\u533a\u522b\u7279\u522b\u6709\u610f\u4e49\u7684\u5730\u65b9\u3002<\/p>\n<p>\u5047\u8bbe&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;user&#034;: {<br \/>\n    &#034;name&#034;: &#034;Alice&#034;,<br \/>\n    &#034;roles&#034;: [<br \/>\n      {<br \/>\n        &#034;name&#034;: &#034;admin&#034;,<br \/>\n        &#034;level&#034;: 10<br \/>\n      },<br \/>\n      {<br \/>\n        &#034;name&#034;: &#034;developer&#034;,<br \/>\n        &#034;level&#034;: 5<br \/>\n      }<br \/>\n    ]<br \/>\n  }<br \/>\n} <\/p>\n<p>\u5217\u5f0f\u5b57\u6bb5\u4ece\u6982\u5ff5\u4e0a\u6765\u8bf4\u662f&#xff1a;<\/p>\n<p>user.name       \u2192 &#034;Alice&#034;<\/p>\n<p>user.roles.name \u2192 [&#034;admin&#034;, &#034;developer&#034;]<br \/>\nuser.roles.level \u2192 [10, 5] <\/p>\n<p>\u5408\u6210 _source \u5fc5\u987b\u91cd\u65b0\u6784\u5efa&#xff1a;<\/p>\n<p>{<br \/>\n  &#034;user&#034;: {<br \/>\n    &#034;name&#034;: &#034;Alice&#034;,<br \/>\n    &#034;roles&#034;: [<br \/>\n      {<br \/>\n        &#034;name&#034;: &#034;admin&#034;,<br \/>\n        &#034;level&#034;: 10<br \/>\n      },<br \/>\n      {<br \/>\n        &#034;name&#034;: &#034;developer&#034;,<br \/>\n        &#034;level&#034;: 5<br \/>\n      }<br \/>\n    ]<br \/>\n  }<br \/>\n} <\/p>\n<p>\u800c\u4e0d\u662f\u7b80\u5355\u5730\u8fd4\u56de\u4e00\u4efd\u5b58\u50a8\u7684\u539f\u59cb JSON \u526f\u672c\u3002<\/p>\n<p>\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u666e\u901a object \u548c nested \u5bf9\u8c61\u4e4b\u95f4\u7684\u533a\u522b\u975e\u5e38\u91cd\u8981\u3002\u5982\u679c roles \u88ab\u6620\u5c04\u4e3a\u666e\u901a\u7684 object&#xff0c;Elasticsearch \u4f1a\u5c06\u5176\u4e2d\u7684\u5b57\u6bb5\u6241\u5e73\u5316\u7528\u4e8e\u7d22\u5f15\u3002\u5982\u679c\u5c06\u5176\u6620\u5c04\u4e3a nested&#xff0c;Elasticsearch \u5219\u4f1a\u4fdd\u7559\u5c5e\u4e8e\u6570\u7ec4\u4e2d\u6bcf\u4e2a\u5143\u7d20\u7684\u5b57\u6bb5\u4e4b\u95f4\u7684\u5173\u8054\u5173\u7cfb\u3002<\/p>\n<\/p>\n<h3>\u4e00\u4e2a\u6709\u7528\u7684\u53ef\u89c6\u5316\u65b9\u5f0f<\/h3>\n<p>\u4f20\u7edf _source&#xff1a;<\/p>\n<p>Original JSON<br \/>\n     \u2502<br \/>\n     \u25bc<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 {                         \u2502<br \/>\n\u2502   &#034;offers&#034;: [             \u2502<br \/>\n\u2502     {                     \u2502<br \/>\n\u2502       &#034;seller&#034;: &#034;Amazon&#034;, \u2502<br \/>\n\u2502       &#034;price&#034;: 2399       \u2502<br \/>\n\u2502     },                    \u2502<br \/>\n\u2502     {                     \u2502<br \/>\n\u2502       &#034;seller&#034;: &#034;BestBuy&#034;,\u2502<br \/>\n\u2502       &#034;price&#034;: 2449       \u2502<br \/>\n\u2502     }                     \u2502<br \/>\n\u2502   ]                       \u2502<br \/>\n\u2502 }                         \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n     \u2502<br \/>\n     \u25bc<br \/>\nStored _source <\/p>\n<p>\u4f7f\u7528\u5408\u6210\u5217\u5f0f _source&#xff1a;<\/p>\n<p>Original JSON<br \/>\n     \u2502<br \/>\n     \u25bc<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 offers.seller \u2192 Amazon     \u2502<br \/>\n\u2502 offers.seller \u2192 BestBuy    \u2502<br \/>\n\u2502 offers.price  \u2192 2399       \u2502<br \/>\n\u2502 offers.price  \u2192 2449       \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518<br \/>\n             \u2502<br \/>\n             \u2502 reconstruct<br \/>\n             \u25bc<br \/>\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<br \/>\n\u2502 Synthetic _source         \u2502<br \/>\n\u2502                           \u2502<br \/>\n\u2502 &#034;offers&#034;: [               \u2502<br \/>\n\u2502   {&#8230;},                  \u2502<br \/>\n\u2502   {&#8230;}                   \u2502<br \/>\n\u2502 ]                         \u2502<br \/>\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 <\/p>\n<h3>\u5173\u952e\u8981\u70b9<\/h3>\n<p>\u6700\u5bb9\u6613\u8bb0\u4f4f\u7684\u65b9\u6cd5\u662f&#xff1a;<\/p>\n<p>columnar \u6a21\u5f0f\u4ee5\u5217\u7684\u5f62\u5f0f\u5b58\u50a8\u6570\u636e&#xff0c;\u800c\u4e0d\u662f\u5b58\u50a8\u539f\u59cb JSON \u6587\u6863\u3002\u9700\u8981\u65f6\u518d\u91cd\u65b0\u6784\u5efa _source\u3002<\/p>\n<p>\u56e0\u6b64&#xff1a;<\/p>\n<p>Original JSON<br \/>\n    \u2193<br \/>\nfield extraction \/ columnar representation<br \/>\n    \u2193<br \/>\ndoc values<br \/>\n    \u2193<br \/>\nsynthetic _source<br \/>\n    \u2193<br \/>\nJSON returned to the client <\/p>\n<p>\u7531\u4e8e JSON \u662f\u91cd\u65b0\u6784\u5efa\u7684&#xff0c;\u56e0\u6b64\u4e0d\u80fd\u5047\u5b9a\u6570\u7ec4\u987a\u5e8f\u4ee5\u53ca\u539f\u59cb JSON \u7684\u786e\u5207\u8868\u793a\u5f62\u5f0f\u4e00\u5b9a\u4f1a\u88ab\u4fdd\u7559\u3002<\/p>\n<p>\u9700\u8981\u5bf9\u524d\u9762\u7684\u793a\u4f8b\u505a\u4e00\u4e2a\u91cd\u8981\u4fee\u6b63&#xff1a;\u5982\u679c\u4f60\u7684\u76ee\u6807\u662f\u4e13\u95e8\u6f14\u793a Elastic \u6587\u6863\u4e2d\u8bb0\u5f55\u7684\u5408\u6210 _source \u5728\u6570\u7ec4 \/ \u5bf9\u8c61\u65b9\u9762\u7684\u9650\u5236&#xff0c;\u90a3\u4e48\u6700\u597d\u76f4\u63a5\u4f7f\u7528 Elastic \u6587\u6863\u4e2d\u7684\u786e\u5207\u5b57\u6bb5\u6620\u5c04\u548c\u793a\u4f8b&#xff0c;\u800c\u4e0d\u8981\u5047\u5b9a\u6bcf\u4e00\u79cd\u5bf9\u8c61\u6570\u7ec4\u7684\u91cd\u5efa\u884c\u4e3a\u90fd\u5b8c\u5168\u7b26\u5408\u524d\u9762\u6240\u793a\u7684\u6982\u5ff5\u6027\u6241\u5e73\u5316\u8fc7\u7a0b\u3002\u5177\u4f53\u884c\u4e3a\u53d6\u51b3\u4e8e\u5b57\u6bb5\u7c7b\u578b\u548c\u6620\u5c04\u65b9\u5f0f&#xff08;keyword\u3001\u6570\u503c\u7c7b\u578b\u3001object\u3001nested \u7b49&#xff09;\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f&#xff1a;\u8fd9\u4e2a\u76ee\u524d\u5728 Elastic Stack 9.5 \u7248\u672c\u4e2d\u662f Preview\u3002\u540e\u671f\u7248\u672c\u6709\u53ef\u80fd\u4f1a\u53d1\u751f\u53d8\u5316\u3002 \u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u5c06 Elasticsearch \u8f6c\u53d8\u4e3a\u4e00\u79cd\u5206\u6790\u578b\u548c\u641c\u7d22\u578b\u5217\u5f0f\u5b58\u50a8&#xff0c;\u7528\u4e8e\u542f\u7528\u4e86\u8be5\u6a21\u5f0f\u7684\u7d22\u5f15\u3002\u5217\u5f0f\u6a21\u5f0f\u4e0d\u4f1a\u9488\u5bf9\u4e0d\u540c\u7684\u67e5\u8be2\u8def\u5f84&#xff0c;\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u4fdd\u7559\u591a\u4e2a\u526f\u672c&#xff0c;\u800c\u662f\u9ed8\u8ba4\u5c06\u5b57\u6bb5\u4f5c\u4e3a doc values \u5b58\u50a8\u4e00\u6b21\u3002\u8fd9\u79cd\u7b56\u7565\u53ef\u4ee5\u964d\u4f4e\u9ad8\u6570\u636e\u91cf\u3001\u4ee5\u5206\u6790\u4e3a\u4e3b\u7684\u6570\u636e\u7684\u5b58\u50a8\u6210\u672c&#xff0c;\u540c\u65f6\u4fdd\u6301\u76f8\u540c\u7684 API\u3001\u4eea\u8868\u677f\u548c\u96c6\u6210\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1299,3368,323,2215,100],"topic":[],"class_list":["post-92573","post","type-post","status-publish","format-standard","hentry","category-server","tag-elasticsearch","tag-3368","tag-323","tag-2215","tag-100"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/92573.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6ce8\u610f&#xff1a;\u8fd9\u4e2a\u76ee\u524d\u5728 Elastic Stack 9.5 \u7248\u672c\u4e2d\u662f Preview\u3002\u540e\u671f\u7248\u672c\u6709\u53ef\u80fd\u4f1a\u53d1\u751f\u53d8\u5316\u3002 \u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u5c06 Elasticsearch \u8f6c\u53d8\u4e3a\u4e00\u79cd\u5206\u6790\u578b\u548c\u641c\u7d22\u578b\u5217\u5f0f\u5b58\u50a8&#xff0c;\u7528\u4e8e\u542f\u7528\u4e86\u8be5\u6a21\u5f0f\u7684\u7d22\u5f15\u3002\u5217\u5f0f\u6a21\u5f0f\u4e0d\u4f1a\u9488\u5bf9\u4e0d\u540c\u7684\u67e5\u8be2\u8def\u5f84&#xff0c;\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u4fdd\u7559\u591a\u4e2a\u526f\u672c&#xff0c;\u800c\u662f\u9ed8\u8ba4\u5c06\u5b57\u6bb5\u4f5c\u4e3a doc values \u5b58\u50a8\u4e00\u6b21\u3002\u8fd9\u79cd\u7b56\u7565\u53ef\u4ee5\u964d\u4f4e\u9ad8\u6570\u636e\u91cf\u3001\u4ee5\u5206\u6790\u4e3a\u4e3b\u7684\u6570\u636e\u7684\u5b58\u50a8\u6210\u672c&#xff0c;\u540c\u65f6\u4fdd\u6301\u76f8\u540c\u7684 API\u3001\u4eea\u8868\u677f\u548c\u96c6\u6210\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/92573.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-10T08:40:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810084044-6a798e8c97748.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/92573.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/92573.html\",\"name\":\"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-10T08:40:45+00:00\",\"dateModified\":\"2026-08-10T08:40:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/92573.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/92573.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/92573.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/92573.html","og_locale":"zh_CN","og_type":"article","og_title":"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6ce8\u610f&#xff1a;\u8fd9\u4e2a\u76ee\u524d\u5728 Elastic Stack 9.5 \u7248\u672c\u4e2d\u662f Preview\u3002\u540e\u671f\u7248\u672c\u6709\u53ef\u80fd\u4f1a\u53d1\u751f\u53d8\u5316\u3002 \u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f\u5c06 Elasticsearch \u8f6c\u53d8\u4e3a\u4e00\u79cd\u5206\u6790\u578b\u548c\u641c\u7d22\u578b\u5217\u5f0f\u5b58\u50a8&#xff0c;\u7528\u4e8e\u542f\u7528\u4e86\u8be5\u6a21\u5f0f\u7684\u7d22\u5f15\u3002\u5217\u5f0f\u6a21\u5f0f\u4e0d\u4f1a\u9488\u5bf9\u4e0d\u540c\u7684\u67e5\u8be2\u8def\u5f84&#xff0c;\u4e3a\u6bcf\u4e2a\u5b57\u6bb5\u4fdd\u7559\u591a\u4e2a\u526f\u672c&#xff0c;\u800c\u662f\u9ed8\u8ba4\u5c06\u5b57\u6bb5\u4f5c\u4e3a doc values \u5b58\u50a8\u4e00\u6b21\u3002\u8fd9\u79cd\u7b56\u7565\u53ef\u4ee5\u964d\u4f4e\u9ad8\u6570\u636e\u91cf\u3001\u4ee5\u5206\u6790\u4e3a\u4e3b\u7684\u6570\u636e\u7684\u5b58\u50a8\u6210\u672c&#xff0c;\u540c\u65f6\u4fdd\u6301\u76f8\u540c\u7684 API\u3001\u4eea\u8868\u677f\u548c\u96c6\u6210\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/92573.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-10T08:40:45+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260810084044-6a798e8c97748.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/92573.html","url":"https:\/\/www.wsisp.com\/helps\/92573.html","name":"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-10T08:40:45+00:00","dateModified":"2026-08-10T08:40:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/92573.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/92573.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/92573.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Elasticsearch\uff1a\u5217\u5f0f\u7d22\u5f15\u6a21\u5f0f - Columnar index mode"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/92573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=92573"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/92573\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=92573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=92573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=92573"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=92573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}