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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # _uid field 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping-uid-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping-uid-field.html) 譯文鏈接 : [http://www.apache.wiki/display/Elasticsearch/_uid+field](http://www.apache.wiki/display/Elasticsearch/_uid+field) 貢獻者 : [朱彥安](/display/~zhuyanan),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) 每個索引的文檔都與一個?**[_type](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping-type-field.html)**(請參見“**[Mapping Types](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping.html#mapping-type)[edit](https://github.com/elastic/elasticsearch/edit/5.3/docs/reference/mapping.asciidoc)**”一節)和一個?**[_id](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/mapping-id-field.html)?**相關聯。 這些值組合為?**{type}#{id}?**并作為?**_uid?**字段編入索引。 該 **_uid**字段的值可以在 **queries**(查詢),**aggregations**(聚合),**scripts**(腳本)以及 **sorting**(排序)時訪問 :? ``` # Example documents curl -XPUT 'localhost:9200/my_index/my_type/1?pretty' -H 'Content-Type: application/json' -d' { "text": "Document with ID 1" } ' curl -XPUT 'localhost:9200/my_index/my_type/2?refresh=true&pretty' -H 'Content-Type: application/json' -d' { "text": "Document with ID 2" } ' curl -XGET 'localhost:9200/my_index/_search?pretty' -H 'Content-Type: application/json' -d' { "query": { "terms": { "_uid": [ "my_type#1", "my_type#2" ] # 1 } }, "aggs": { "UIDs": { "terms": { "field": "_uid", # 2 "size": 10 } } }, "sort": [ { "_uid": { # 3 "order": "desc" } } ], "script_fields": { "UID": { "script": { "lang": "painless", "inline": "doc['_uid']" # 4 } } } } ' ``` | 1 | 在 **_uid** 字段上查詢 (也可以參考?**[ids?query](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/query-dsl-ids-query.html)**) | | 2 | 在 **_uid** 字段上聚合 | | 3 | 在 **_uid** 字段上排序 | | 4 | 在腳本中訪問 **_uid** 字段 |
                  <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>

                              哎呀哎呀视频在线观看