<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # store(存儲) 默認情況下,字段值會被索引使他們能搜索,但他們不會被?**stored**(存儲)。意思就是這個字段能查詢,但不能取回他的原始值。 但這沒有關系。這個字段值已經是`**[_source](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping-source-field.html "_source field")?**字段的一部分,他是被默認存儲的。如果你只想取回一個字段或者少部分字段的值,而不是整個?**[_source](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping-source-field.html "_source field")**,可以通過?**[source filtering](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/search-request-source-filtering.html "Source filtering")**<span style="color: rgb(68, 68, 68);">?達到目的。</span>` 在這種情況下可以有意識的去**store**(存儲)一個字段。例如,你有一個包含**title**(標題),?**date**(時間)和一個很大的?**content**(內容)字段,你僅僅只想取回?**title**?和?**date**?,而不需要從整個?**`_source`**字段提取內容: | `curl -XPUT?``'localhost:9200/my_index?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"mappings"``: {` `"my_type"``: {` `"properties"``: {` `"title"``: {` `"type"``:?``"text"``,` `"store"``:?``true`?`#1` `},` `"date"``: {` `"type"``:?``"date"``,` `"store"``:?``true`?`#2` `},` `"content"``: {` `"type"``:?``"text"` `}` `}` `}` `}` `}` `'` `curl -XPUT?``'localhost:9200/my_index/my_type/1?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"title"``:???``"Some short title"``,` `"date"``:????``"2015-01-01"``,` `"content"``:?``"A very long content field..."` `}` `'` `curl -XGET?``'localhost:9200/my_index/_search?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"stored_fields"``: [?``"title"``,?``"date"`?`]?``#3` `}` `'` | | 1 2 | **title**?和?**date**?字段將被存儲。 | | 3 | 這個請求將返回?**title**?和?**date**的值。 | 備注 **存儲的字段將作為數組返回** 為了保持一致性,存儲的字段將總是作為數據返回,因為沒有辦法知道原始字段是單個值、多值還是空數組。 如果你需要原始值,你應該從?**`_source`**字段返回。 另一種情況存儲字段,是存在沒有存入?**`_source`**的字段(例如?`**[copy_to](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/copy-to.html "copy_to")?**字段`)。
                  <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>

                              哎呀哎呀视频在线观看