<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                #### 自定義_all字段 在[元數據:_all字段](../070_Index_Mgmt/32_Metadata_all.md)中,我們解釋了特殊的_all字段會將其它所有字段中的值作為一個大字符串進行索引。盡管將所有字段的值作為一個字段進行索引并不是非常靈活。如果有一個自定義的_all字段用來索引人名,另外一個自定義的_all字段用來索引地址就更好了。 ES通過字段映射中的copy_to參數向我們提供了這一功能: ```Javascript PUT /my_index { "mappings": { "person": { "properties": { "first_name": { "type": "string", "copy_to": "full_name" <1> }, "last_name": { "type": "string", "copy_to": "full_name" <1> }, "full_name": { "type": "string" } } } } } ``` // SENSE: 110_Multi_Field_Search/45_Custom_all.json <1> first_name和last_name字段中的值會被拷貝到full_name字段中。 有了這個映射,我們可以通過first_name字段查詢名字,last_name字段查詢姓氏,或者full_name字段查詢姓氏和名字。 > 提示:first_name和last_name字段的映射和full_name字段的索引方式的無關。full_name字段會從其它兩個字段中拷貝字符串的值,然后僅根據full_name字段自身的映射進行索引。 <!-- [[custom-all]] === Custom _all Fields In <<all-field>>, we explained that the special `_all` field indexes the values from all other fields as one big string.((("_all field", sortas="all field")))((("multifield search", "custom _all fields"))) Having all fields indexed into one field is not terribly flexible, though. It would be nice to have one custom `_all` field for the person's name, and another custom `_all` field for the address. Elasticsearch provides us with this functionality via the `copy_to` parameter in a field ((("copy_to parameter")))((("mapping (types)", "copy_to parameter")))mapping: [source,js] -------------------------------------------------- PUT /my_index { "mappings": { "person": { "properties": { "first_name": { "type": "string", "copy_to": "full_name" <1> }, "last_name": { "type": "string", "copy_to": "full_name" <1> }, "full_name": { "type": "string" } } } } } -------------------------------------------------- // SENSE: 110_Multi_Field_Search/45_Custom_all.json <1> The values in the `first_name` and `last_name` fields are also copied to the `full_name` field. With this mapping in place, we can query the `first_name` field for first names, the `last_name` field for last name, or the `full_name` field for first and last names. NOTE: Mappings of the `first_name` and `last_name` fields have no bearing on how the `full_name` field is indexed. The `full_name` field copies the string values from the other two fields, then indexes them according to the mapping of the `full_name` field only. -->
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看