{"id":1315,"date":"2024-08-23T20:59:56","date_gmt":"2024-08-23T12:59:56","guid":{"rendered":"http:\/\/blue.yn.cn\/?p=1315"},"modified":"2024-08-23T21:57:03","modified_gmt":"2024-08-23T13:57:03","slug":"object%e5%8f%8anested%e6%95%b0%e6%8d%ae%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"http:\/\/blue.yn.cn\/?p=1315","title":{"rendered":"object\u53canested\u6570\u636e\u7c7b\u578b"},"content":{"rendered":"<p>\u4e00\u4e2a<code>blog<\/code>\u53ef\u80fd\u5bf9\u5e94\u4e8e\u5f88\u591a\u7684<code>comments<\/code>\uff0c\u6216\u8005\u4e00\u4e2a\u5458\u5de5\u5bf9\u5e94\u4e8e\u5f88\u591a\u7684\u7ecf\u9a8c\u3002\uff0c<br \/>\n\u8fd9\u79cd\u6570\u636e\u5c31\u662f\u5173\u7cfb\u6570\u636e\u3002<\/p>\n<h3>object\u6570\u636e\u7c7b\u578b<\/h3>\n<p>json\u6587\u6863\u672c\u8d28\u4e0a\u5e02\u5206\u6210\u7684\uff1a\u6587\u6863\u53ef\u80fd\u5305\u542b\u5185\u90e8\u5bf9\u8c61\uff0c\u800c\u5185\u90e8\u5bf9\u8c61\u53c8\u53ef\u80fd\u5305\u542b\u5185\u90e8\u5bf9\u8c61\u7684\u672c\u8eab\uff1b<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2024\/08\/image-1724418468156.png\" alt=\"file\" \/><\/p>\n<ol>\n<li>\u5916\u90e8\u6587\u6863\u4e5f\u662f\u4e00\u4e2a<code>json<\/code>\u5bf9\u8c61<\/li>\n<li>\u5b83\u5305\u542b\u4e00\u4e2a\u540d\u4e3a<code>manager<\/code>\u7684\u5185\u90e8\u5bf9\u8c61<\/li>\n<li>\u5176\u4e2d\u53c8\u5305\u542b\u4e00\u4e2a\u540d\u4e3a<code>name<\/code>\u7684\u5185\u90e8\u5bf9\u8c61<\/li>\n<\/ol>\n<p>\u5728<code>elasticsearch<\/code>\u5185\u90e8\uff0c\u8be5\u6587\u6863\u88ab\u7d22\u5f15\u4e3a\u4e00\u4e2a\u7b80\u5355\u7684\u952e\u503c\u5bf9\u5e94\u5217\u8868\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code class=\"language-javascript\">{\n  &quot;region&quot;:             &quot;US&quot;,\n  &quot;manager.age&quot;:        30,\n  &quot;manager.name.first&quot;: &quot;John&quot;,\n  &quot;manager.name.last&quot;:  &quot;Smith&quot;\n}<\/code><\/pre>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9996\u9009\u521b\u5efa\u4e00\u4e2a\u53eb\u505a<code>developer<\/code>\u7684\u7d22\u5f15\uff0c\u5e76\u8f93\u5165\u5982\u4e0b\u7684\u4e24\u4e2a\u6570\u636e\uff1a<\/p>\n<pre><code class=\"language-javascript\">POST developer\/_doc\/101\n{\n  &quot;name&quot;: &quot;zhang san&quot;,\n  &quot;skills&quot;: [\n    {\n      &quot;language&quot;: &quot;ruby&quot;,\n      &quot;level&quot;: &quot;expert&quot;\n    },\n    {\n      &quot;language&quot;: &quot;javascript&quot;,\n      &quot;level&quot;: &quot;beginner&quot;\n    }\n   ]\n}\n\nPOST developer\/_doc\/102\n{\n  &quot;name&quot;: &quot;li si&quot;,\n  &quot;skills&quot;: [\n    {\n      &quot;language&quot;: &quot;ruby&quot;,\n      &quot;level&quot;: &quot;beginner&quot;\n    }\n   ]\n}<\/code><\/pre>\n<h4>object query<\/h4>\n<p>\u8fd9\u4e2a\u65f6\u5019\u6211\u4eec\u60f3\u641c\u4e00\u4e2a<code>skill:language<\/code>\u662f<code>ruby<\/code>\uff0c\u5e76\u4e14<code>level<\/code>\u662f<code>beginner<\/code>\u7684\u6587\u6863\u3002<br \/>\n\u6211\u4eec\u53ef\u80fd\u60f3\u5230\u7684\u529e\u6cd5\u662f\uff1a<\/p>\n<pre><code class=\"language-javascript\">GET developer\/_search\n{\n  &quot;query&quot;: {\n    &quot;bool&quot;: {\n      &quot;filter&quot;: [\n        {\n          &quot;match&quot;: {\n            &quot;skills.language&quot;: &quot;ruby&quot;\n          }\n        },\n        {\n          &quot;match&quot;: {\n            &quot;skills.level&quot;: &quot;beginner&quot;\n          }\n        }\n      ]\n    }\n  }\n}<\/code><\/pre>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u641c\u5bfb\uff0c\u6211\u4eec\u5f97\u5230\u7684\u7ed3\u679c\u662f\uff1a<\/p>\n<pre><code class=\"language-javascript\">{\n  &quot;took&quot; : 0,\n  &quot;timed_out&quot; : false,\n  &quot;_shards&quot; : {\n    &quot;total&quot; : 1,\n    &quot;successful&quot; : 1,\n    &quot;skipped&quot; : 0,\n    &quot;failed&quot; : 0\n  },\n  &quot;hits&quot; : {\n    &quot;total&quot; : {\n      &quot;value&quot; : 2,\n      &quot;relation&quot; : &quot;eq&quot;\n    },\n    &quot;max_score&quot; : 0.0,\n    &quot;hits&quot; : [\n      {\n        &quot;_index&quot; : &quot;developer&quot;,\n        &quot;_type&quot; : &quot;_doc&quot;,\n        &quot;_id&quot; : &quot;101&quot;,\n        &quot;_score&quot; : 0.0,\n        &quot;_source&quot; : {\n          &quot;name&quot; : &quot;zhang san&quot;,\n          &quot;skills&quot; : [\n            {\n              &quot;language&quot; : &quot;ruby&quot;,\n              &quot;level&quot; : &quot;expert&quot;\n            },\n            {\n              &quot;language&quot; : &quot;javascript&quot;,\n              &quot;level&quot; : &quot;beginner&quot;\n            }\n          ]\n        }\n      },\n      {\n        &quot;_index&quot; : &quot;developer&quot;,\n        &quot;_type&quot; : &quot;_doc&quot;,\n        &quot;_id&quot; : &quot;102&quot;,\n        &quot;_score&quot; : 0.0,\n        &quot;_source&quot; : {\n          &quot;name&quot; : &quot;li si&quot;,\n          &quot;skills&quot; : [\n            {\n              &quot;language&quot; : &quot;ruby&quot;,\n              &quot;level&quot; : &quot;beginner&quot;\n            }\n          ]\n        }\n      }\n    ]\n  }\n}<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u6211\u4eec\u5f97\u5230\u4e24\u4e2a\u7ed3\u679c\u3002<br \/>\n\u4f46\u662f\u6211\u4eec\u4ed4\u7ec6\u67e5\u770b\u4ee5\u4e0b\u53d1\u73b0\u5f97\u5230\u7684\u7ed3\u679c\u5e76\u4e0d\u662f\u6211\u4eec\u60f3\u5f97\u5230\u7684\u3002<br \/>\n\u4ece\u539f\u610f\u6765\u8bf4\uff0c\u6211\u4eec\u60f3\u5f97\u5230\u7684\u662f<code>li si<\/code>\uff0c\u56e0\u4e3a\u53ea\u6709<code>li si<\/code>\u8fd9\u4e2a\u4eba\u7684<code>language<\/code>\u662f<code>ruby<\/code>\uff0c\u5e76\u4e14\u4ed6\u7684<code>level<\/code>\u662f<code>beginner<\/code><br \/>\n<code>zhang san<\/code>\u8fd9\u4e2a\u6587\u6863\uff0c\u5e94\u8be5\u4e0d\u5728\u641c\u5bfb\u4e4b\u5217\u3002\u8fd9\u662f\u4e3a\u4ec0\u4e48\u5462\uff1f<\/p>\n<p>\u539f\u6765\uff0c<code>language<\/code>\u53ca<code>level<\/code>\u662f<code>skill<\/code>\u7684<code>json<\/code>\u5185\u90e8\u6570\u7ec4\u9879\u3002<br \/>\n\u5f53<code>json<\/code>\u5bf9\u8c61\u88ab<code>lucene<\/code>\u6241\u5e73\u5316\u540e\uff0c\u6211\u4eec\u5931\u53bb\u4e86<code>language<\/code>\u548c<code>level<\/code>\u4e4b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb<br \/>\n\u53d6\u800c\u4ee3\u4e4b\u7684\u662f\u5982\u4e0b\u7684\u8fd9\u79cd\u5173\u7cfb\uff1a<\/p>\n<pre><code class=\"language-javascript\">{\n  &quot;name&quot;: &quot;zhang san&quot;,\n  &quot;skills.language&quot; :[&quot;ruby&quot;, &quot;javascript&quot;],\n  &quot;skills.level&quot;: [&quot;expert&quot;, &quot;beginner&quot;]\n}<\/code><\/pre>\n<p>\u5982\u4e0a\u6240\u793a\uff0c\u6211\u4eec\u770b\u5230\u7684\u662f\u4e00\u4e2a\u6241\u5e73\u5316\u7684\u6570\u7ec4\u3002<br \/>\n\u4e4b\u524d\u7684\u90a3\u79cd<code>language<\/code>\u548c<code>level<\/code>\u4e4b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb\u5df2\u7ecf\u4e0d\u5b58\u5728\u4e86\u3002<\/p>\n<h4>object aggregation<\/h4>\n<p>\u540c\u6837\u7684\u95ee\u9898\u4e5f\u5b58\u5728\u4e8e<code>aggregation<\/code>\u4e2d\uff0c\u6bd4\u5982\u6211\u4eec\u60f3\u505a\u4ee5\u4e0b\u7684<code>aggregation<\/code><\/p>\n<pre><code class=\"language-javascript\">GET developer\/_search\n{\n  &quot;size&quot;: 0,\n  &quot;aggs&quot;: {\n    &quot;languages&quot;: {\n      &quot;terms&quot;: {\n        &quot;field&quot;: &quot;skills.language.keyword&quot;\n      },\n      &quot;aggs&quot;: {\n        &quot;level&quot;: {\n          &quot;terms&quot;: {&quot;field&quot;: &quot;skills.level.keyword&quot;}\n        }\n      }\n    }\n  }\n}<\/code><\/pre>\n<pre><code class=\"language-javascript\">{\n  &quot;took&quot; : 2,\n  &quot;timed_out&quot; : false,\n  &quot;_shards&quot; : {\n    &quot;total&quot; : 1,\n    &quot;successful&quot; : 1,\n    &quot;skipped&quot; : 0,\n    &quot;failed&quot; : 0\n  },\n  &quot;hits&quot; : {\n    &quot;total&quot; : {\n      &quot;value&quot; : 2,\n      &quot;relation&quot; : &quot;eq&quot;\n    },\n    &quot;max_score&quot; : null,\n    &quot;hits&quot; : [ ]\n  },\n  &quot;aggregations&quot; : {\n    &quot;languages&quot; : {\n      &quot;doc_count_error_upper_bound&quot; : 0,\n      &quot;sum_other_doc_count&quot; : 0,\n      &quot;buckets&quot; : [\n        {\n          &quot;key&quot; : &quot;ruby&quot;,\n          &quot;doc_count&quot; : 2,\n          &quot;level&quot; : {\n            &quot;doc_count_error_upper_bound&quot; : 0,\n            &quot;sum_other_doc_count&quot; : 0,\n            &quot;buckets&quot; : [\n              {\n                &quot;key&quot; : &quot;beginner&quot;,\n                &quot;doc_count&quot; : 2\n              },\n              {\n                &quot;key&quot; : &quot;expert&quot;,\n                &quot;doc_count&quot; : 1\n              }\n            ]\n          }\n        },\n        {\n          &quot;key&quot; : &quot;javascript&quot;,\n          &quot;doc_count&quot; : 1,\n          &quot;level&quot; : {\n            &quot;doc_count_error_upper_bound&quot; : 0,\n            &quot;sum_other_doc_count&quot; : 0,\n            &quot;buckets&quot; : [\n              {\n                &quot;key&quot; : &quot;beginner&quot;,\n                &quot;doc_count&quot; : 1\n              },\n              {\n                &quot;key&quot; : &quot;expert&quot;,\n                &quot;doc_count&quot; : 1\n              }\n            ]\n          }\n        }\n      ]\n    }\n  }\n}<\/code><\/pre>\n<p>\u663e\u7136\uff0c\u5bf9\u4e8e <code>key javascript<\/code> \u6765\u8bf4\uff0c\u5b83\u5e76\u6ca1\u6709 <code>expert<\/code> \u5bf9\u5e94\u7684 <code>level<\/code>\uff0c\u4f46\u662f\u5728\u6211\u4eec\u7684 <code>aggregation<\/code> \u91cc\u663e\u793a\u51fa\u6765\u4e86\u3002<br \/>\n\u8fd9\u4e2a\u7ed3\u679c\u663e\u7136\u662f\u9519\u8bef\u7684\u3002<\/p>\n<h3>nested\u6570\u636e\u7c7b\u578b<\/h3>\n<p><code>nested<\/code>\u7c7b\u578b\u662f<code>object<\/code>\u6570\u636e\u7c7b\u578b\u7684\u7279\u6b8a\u7248\u672c\uff0c\u5b83\u5141\u8bb8\u5bf9\u8c61\u6570\u7ec4\u4ee5\u4e00\u79cd\u53ef\u4ee5\u5f7c\u6b64\u72ec\u7acb\u67e5\u8be2\u7684\u65b9\u5f0f\u8fdb\u884c\u7d22\u5f15\u3002<br \/>\n\u5728\u5185\u90e8\uff0c\u5d4c\u5957\u5bf9\u8c61\u5c06\u6570\u7ec4\u4e2d\u7684\u6bcf\u4e2a\u5bf9\u8c61\u7d22\u5f15\u4e3a\u5355\u72ec\u7684\u9690\u85cf\u6587\u6863\uff0c\u8fd9\u610f\u5473\u7740\u6bcf\u4e2a\u5d4c\u5957\u5bf9\u8c61\u90fd\u53ef\u4ee5\u4f7f\u7528<code>nested query<\/code>\u72ec\u7acb\u4e8e\u5176\u4ed6\u5bf9\u8c61\u7684\u67e5\u8be2\u3002<br \/>\n\u6bcf\u4e2a<code>nested<\/code>\u5bf9\u8c61\u90fd\u88ab\u7d22\u5f15\u4e3a\u4e00\u4e2a\u5355\u72ec\u7684<code>lucene<\/code>\u6587\u6863\u3002<br \/>\n<code>nested<\/code>\u6570\u636e\u7c7b\u578b\u80fd\u591f\u8ba9\u6211\u4eec\u5bf9<code>object<\/code>\u6570\u7ec4\u5efa\u7acb\u7d22\u5f15\uff0c\u5e76\u4e14\u5206\u522b\u8fdb\u884c\u67e5\u8be2<\/p>\n<p><strong>\u5982\u679c\u9700\u8981\u7ef4\u62a4\u6570\u7ec4\u4e2d\u6bcf\u4e2a\u5bf9\u8c61\u7684\u5173\u7cfb\uff0c\u8bf7\u4f7f\u7528nested\u6570\u636e\u7c7b\u578b<\/strong><\/p>\n<p>\u4e3a\u4e86\u80fd\u591f\u628a\u6211\u4eec\u7684\u6570\u636e\u5b9a\u4e49\u4e3a<code>nested<\/code>\uff0c\u5fc5\u987b\u4fee\u6539\u4e4b\u524d\u7684\u7d22\u5f15\u4e3a<code>mapping<\/code>\u4e3a\uff1a<\/p>\n<pre><code class=\"language-javascript\">DELETE developer\n\nPUT developer\n{\n  &quot;mappings&quot;: {\n    &quot;properties&quot;: {\n      &quot;name&quot;: {\n        &quot;type&quot;: &quot;text&quot;\n      },\n      &quot;skills&quot;: {\n        &quot;type&quot;: &quot;nested&quot;,\n        &quot;properties&quot;: {\n          &quot;language&quot;: {\n            &quot;type&quot;: &quot;keyword&quot;\n          },\n          &quot;level&quot;: {\n            &quot;type&quot;: &quot;keyword&quot;\n          }\n        }\n      }\n    }\n  }\n}<\/code><\/pre>\n<p>\u7ecf\u8fc7\u8fd9\u6837\u7684\u6539\u9020\u4e4b\u540e\uff0c\u91cd\u65b0\u628a\u6211\u4eec\u4e4b\u524d\u7684\u6570\u636e\u8f93\u5165\u5230<code>index<\/code>\u91cc\uff1a<\/p>\n<pre><code class=\"language-javascript\">POST developer\/_doc\/101\n{\n  &quot;name&quot;: &quot;zhang san&quot;,\n  &quot;skills&quot;: [\n    {\n      &quot;language&quot;: &quot;ruby&quot;,\n      &quot;level&quot;: &quot;expert&quot;\n    },\n    {\n      &quot;language&quot;: &quot;javascript&quot;,\n      &quot;level&quot;: &quot;beginner&quot;\n    }\n   ]\n}\n\nPOST developer\/_doc\/102\n{\n  &quot;name&quot;: &quot;li si&quot;,\n  &quot;skills&quot;: [\n    {\n      &quot;language&quot;: &quot;ruby&quot;,\n      &quot;level&quot;: &quot;beginner&quot;\n    }\n   ]\n}<\/code><\/pre>\n<p>\u9488\u5bf9101\uff0c\u5728<code>lucene<\/code>\u4e2d\u7684\u6570\u636e\u7ed3\u6784\u53d8\u4e3a\uff1a<\/p>\n<pre><code class=\"language-javascript\">{\n  &quot;name&quot;: &quot;zhang san&quot;,\n  {\n    &quot;skills.language&quot;: &quot;ruby&quot;,\n    &quot;skills.level&quot;: &quot;expert&quot;\n  },\n  {\n    &quot;skills.language&quot;: &quot;javascript&quot;,\n    &quot;skills.level&quot;, &quot;beginner&quot;\n  }\n}<\/code><\/pre>\n<h4>nested query<\/h4>\n<p>\u6211\u4eec\u6765\u91cd\u65b0\u505a\u4e4b\u524d\u7684\u641c\u7d22\uff1a<\/p>\n<pre><code class=\"language-javascript\">GET developer\/_search\n{\n  &quot;query&quot;: {\n    &quot;nested&quot;: {\n      &quot;path&quot;: &quot;skills&quot;,\n      &quot;query&quot;: {\n        &quot;bool&quot;: {\n          &quot;filter&quot;: [\n            {\n              &quot;match&quot;: {\n                &quot;skills.language&quot;: &quot;ruby&quot;\n              }\n            },\n            {\n              &quot;match&quot;: {\n                &quot;skills.level&quot;: &quot;beginner&quot;\n              }\n            }\n          ]\n        }\n      }\n    }\n  }\n}<\/code><\/pre>\n<p>\u6ce8\u610f\u4e0a\u9762\u7684<code>nested<\/code>\u5b57\u6bb5\u3002\u663e\u793a\u7684\u7ed3\u679c\u662f\uff1a<\/p>\n<pre><code class=\"language-javascript\">{\n  &quot;took&quot; : 5,\n  &quot;timed_out&quot; : false,\n  &quot;_shards&quot; : {\n    &quot;total&quot; : 1,\n    &quot;successful&quot; : 1,\n    &quot;skipped&quot; : 0,\n    &quot;failed&quot; : 0\n  },\n  &quot;hits&quot; : {\n    &quot;total&quot; : {\n      &quot;value&quot; : 1,\n      &quot;relation&quot; : &quot;eq&quot;\n    },\n    &quot;max_score&quot; : 0.0,\n    &quot;hits&quot; : [\n      {\n        &quot;_index&quot; : &quot;developer&quot;,\n        &quot;_type&quot; : &quot;_doc&quot;,\n        &quot;_id&quot; : &quot;102&quot;,\n        &quot;_score&quot; : 0.0,\n        &quot;_source&quot; : {\n          &quot;name&quot; : &quot;li si&quot;,\n          &quot;skills&quot; : [\n            {\n              &quot;language&quot; : &quot;ruby&quot;,\n              &quot;level&quot; : &quot;beginner&quot;\n            }\n          ]\n        }\n      }\n    ]\n  }\n}<\/code><\/pre>\n<p>\u663e\u7136\uff0c\u6211\u4eec\u53ea\u5f97\u5230\u4e86\u4e00\u4e2a\u6211\u4eec\u60f3\u8981\u7684\u7ed3\u679c\u3002<\/p>\n<h4>nested aggregation<\/h4>\n<p>\u540c\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u5bf9\u7d22\u5f15\u6765\u505a\u4e00\u4e2a<code>aggregation<\/code>\uff1a<\/p>\n<pre><code class=\"language-javascript\">GET developer\/_search\n{\n  &quot;size&quot;: 0,\n  &quot;aggs&quot;: {\n    &quot;nested_skills&quot;: {\n      &quot;nested&quot;: {\n        &quot;path&quot;: &quot;skills&quot;\n      },\n      &quot;aggs&quot;: {\n        &quot;languages&quot;: {\n          &quot;terms&quot;: {\n            &quot;field&quot;: &quot;skills.language&quot;\n          },\n          &quot;aggs&quot;: {\n            &quot;levels&quot;: {\n              &quot;terms&quot;: {\n                &quot;field&quot;: &quot;skills.level&quot;\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}<\/code><\/pre>\n<p>\u663e\u793a\u7684\u7ed3\u679c\u662f\uff1a<\/p>\n<pre><code class=\"language-javascript\">{\n  &quot;took&quot; : 1,\n  &quot;timed_out&quot; : false,\n  &quot;_shards&quot; : {\n    &quot;total&quot; : 1,\n    &quot;successful&quot; : 1,\n    &quot;skipped&quot; : 0,\n    &quot;failed&quot; : 0\n  },\n  &quot;hits&quot; : {\n    &quot;total&quot; : {\n      &quot;value&quot; : 2,\n      &quot;relation&quot; : &quot;eq&quot;\n    },\n    &quot;max_score&quot; : null,\n    &quot;hits&quot; : [ ]\n  },\n  &quot;aggregations&quot; : {\n    &quot;nested_skills&quot; : {\n      &quot;doc_count&quot; : 3,\n      &quot;languages&quot; : {\n        &quot;doc_count_error_upper_bound&quot; : 0,\n        &quot;sum_other_doc_count&quot; : 0,\n        &quot;buckets&quot; : [\n          {\n            &quot;key&quot; : &quot;ruby&quot;,\n            &quot;doc_count&quot; : 2,\n            &quot;levels&quot; : {\n              &quot;doc_count_error_upper_bound&quot; : 0,\n              &quot;sum_other_doc_count&quot; : 0,\n              &quot;buckets&quot; : [\n                {\n                  &quot;key&quot; : &quot;beginner&quot;,\n                  &quot;doc_count&quot; : 1\n                },\n                {\n                  &quot;key&quot; : &quot;expert&quot;,\n                  &quot;doc_count&quot; : 1\n                }\n              ]\n            }\n          },\n          {\n            &quot;key&quot; : &quot;javascript&quot;,\n            &quot;doc_count&quot; : 1,\n            &quot;levels&quot; : {\n              &quot;doc_count_error_upper_bound&quot; : 0,\n              &quot;sum_other_doc_count&quot; : 0,\n              &quot;buckets&quot; : [\n                {\n                  &quot;key&quot; : &quot;beginner&quot;,\n                  &quot;doc_count&quot; : 1\n                }\n              ]\n            }\n          }\n        ]\n      }\n    }\n  }\n}<\/code><\/pre>\n<p>\u4ece\u4e0a\u9762\u663e\u793a\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u770b\u51fa\u6765\u5bf9\u4e8e <code>ruby<\/code> \u6765\u8bf4\uff0c\u5b83\u5206\u522b\u5bf9\u5e94\u4e8e\u4e00\u4e2a<code> bigginer<\/code> \u53ca\u4e00\u4e2a <code>expert<\/code>\u3002<br \/>\n\u8fd9\u4e2a\u548c\u6211\u4eec\u4e4b\u524d\u7684\u6570\u636e\u662f\u4e00\u6837\u7684\u3002<br \/>\n\u5bf9\u4e8e <code>javascript<\/code> \u6765\u8bf4\uff0c\u5b83\u53ea\u6709\u4e00\u4e2a <code>beginner<\/code> \u7684 <code>level<\/code>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2ablog\u53ef\u80fd\u5bf9\u5e94\u4e8e\u5f88\u591a\u7684comments\uff0c\u6216\u8005\u4e00\u4e2a\u5458\u5de5\u5bf9\u5e94\u4e8e\u5f88\u591a\u7684\u7ecf\u9a8c\u3002\uff0c \u8fd9\u79cd\u6570\u636e\u5c31\u662f\u5173\u7cfb\u6570\u636e\u3002 obj&#8230; &raquo; <a class=\"read-more-link\" href=\"http:\/\/blue.yn.cn\/?p=1315\">\u9605\u8bfb\u5168\u6587<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-1315","post","type-post","status-publish","format-standard","hentry","category-elk"],"_links":{"self":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts\/1315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1315"}],"version-history":[{"count":3,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts\/1315\/revisions"}],"predecessor-version":[{"id":1320,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=\/wp\/v2\/posts\/1315\/revisions\/1320"}],"wp:attachment":[{"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1315"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blue.yn.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}