<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國際加速解決方案。 廣告
                # Mapping(映射) **Mapping** 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started.html)(修改該鏈接為官網對應的鏈接) 譯文鏈接 : [http://www.apache.wiki/display/Elasticsearch](http://www.apache.wiki/display/Elasticsearch)(修改該鏈接為 ApacheCN 對應的譯文鏈接) 貢獻者 : @您的名字 ## Meta-Fields (元數據字段) ``` 每個?document?都有與之相關的元數據,比如?_index,映射?_type?和?_id?meta-fields?。當有這些行為時可以定制這些meta-fields創建一個映射類型。 ``` **Identity meta-fields?**(特性?meta-fields?) ?_index ? ??索引文檔所屬。 _uid ? ? ? ? ?一個復合字段包含?**_type**?和?**_id?**組成。 _type ? ? ? ?文檔的映射類型。 _id ? ? ? ? ? ?文檔的ID。 Document source meta-fields**?(文檔源?meta-fields )** `_source` 原始**?JSON?**表示文檔的主體**。** `_size` **? ? ? ? ? ? ?_source?**字段的大小字節**, mapper-size?**提供的插件**。** Indexing meta-fields(索引 meta-fields ) **_all?** ? ? ? ? ??全方位字段索引所有其他字段的值。 **`_field_names`** ? ? ? ? ? ?所有字段的文檔包含空值。 **Routing meta-fields** (路由 **meta-fields** ) `_parent` ?? ? ? ? ? ? ??用于創建父子兩個映射類型之間的關系。 **`_routing`** **?? ? ? ? ? ? ??自定義路由值文檔路由到一個特定的 shard?。** **Other meta-field (其他**meta-field?**)** **`_meta`** **?? ? ? ? ? ? ?特定于應用程序的元數據。** ### `_all`**?field** 這個 **_all field** 是一個特殊的全方位連接的所有其他字段的值為一個大的字符串,使用空間作為分隔符,然后分析和索引,但不能存儲。這意味著它可以搜索,但不是檢索。 **_all field**?字段允許您搜索文件中的值不知道哪個字段包含的值。這使其成為一個有用的選項時,開始使用一種新的數據集。例如: ``` PUT my_index/user/1 { "first_name": "John", "last_name": "Smith", "date_of_birth": "1970-10-24" } GET my_index/_search { "query": { "match": { "_all": "john smith 1970" } } } ``` 該 _all field 將會包含這些條款 :[ "john", "smith", "1970", "10", "24" ] 注意 所有的值作為字符串 date_of_birth字段在上面的例子中是被認為是一個日期字段,所以將索引一個術語代表 1970-10-24 00:00:00 **UTC**。**_all field** ,然而,把所有的值作為字符串,所以日期值與三個字符串索引術語:“1970”,“24”,“10”。 重要的是要注意,**_all field** 結合原來自每個字段的值為字符串。它不將從每個字段。 **_all field?**字段只是一個文本字段,并接受其他字符串字段接受相同的參數,包括 **analyzer**?,**term_vectors**,**index_options**和存儲。 **_all field?**字段可能是有用的,尤其是當使用簡單探索新的數據過濾。然而,通過連接字段值為一個大的字符串,_all領域失去了區分短字段(更相關的)和長字段(不那么相關)。使用情況下搜索的相關性是很重要的,最好是專門查詢單個字段。 **_all field?**字段并不是免費的:它需要額外的CPU周期和使用更多的磁盤空間。如果不需要,它可以完全禁用或定制域基礎上。 **Using the _all field in queries** (在查詢中使用_all字段) **query_string?**和 **simple_query_string?**查詢查詢 **_all field?**字段默認情況下,除非另一個字段指定: ``` GET _search { "query": { "query_string": { "query": "john smith 1970" } } } ``` 也是一樣的嗎?q = 參數搜索請求URI(重寫內部query_string查詢): ``` GET _search?q=john+smith+1970 ``` 其他的查詢,例如 **match** 和 **term** 查詢,需要顯式地指定 _all field 參考第一個例子。 Disabling the?`_all`?field(禁用 _all field?) _all field?可以完全的禁用每種類型通過設置參數**?`enabled`?to?`false`**: ``` PUT my_index { "mappings": { "type_1": { "properties": {...} }, "type_2": { "_all": { "enabled": false }, "properties": {...} } } } ``` * 1\. _all field 在 type_1 中是不可用的。 * 2.?_all field 在 type_2 中是完全不可用的。 如果 _all field 是不可用的,這時 URL 搜索請求和?**query_string** 和?**simple_query_string** 將不無法用它來查詢(參見使用中的 **_all** 字段查詢)。您可以配置與?**index.query?**他們使用不同的領域。**default_field?**設置: ``` PUT my_index { "mappings": { "my_type": { "_all": { "enabled": false }, "properties": { "content": { "type": "text" } } } }, "settings": { "index.query.default_field": "content" } } ``` * 1\. **_all****field** 對 **my_type** 類型是禁用的。 * 2\. **query_string?**查詢將默認查詢內容字段索引。 Excluding fields from?`_all (從 _all 排除字段)` 單個字段可以包含或排除從 **_all field** 中用 **include_in_all**?進行設置。 Index boosting and the?`_all`?field ( 索引提高) 單個字段可以被提高在索引的時候,用 boost 參數。 這個 _all 字段考慮了這些增強: ``` PUT myindex { "mappings": { "mytype": { "properties": { "title": { "type": "text", "boost": 2 }, "content": { "type": "text" } } } } } ``` 1\. 當查詢這個 _all 字段時,詞起源于標題字段的詞是起源于內容字段的2倍。 waring 使用index-time提高_all領域產生重大影響查詢性能。更好的解決方案通常是單獨查詢字段,和可選的查詢時間增加。
                  <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>

                              哎呀哎呀视频在线观看