<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國際加速解決方案。 廣告
                # Simulate Pipeline API(模擬管道 API) 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/simulate-pipeline-api.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/simulate-pipeline-api.html) 譯文鏈接 : [http://www.apache.wiki/pages/viewpage.action?pageId=9406138](http://www.apache.wiki/pages/viewpage.action?pageId=9406138) 貢獻者 : [那伊抹微笑](/display/~wangyangting),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) 該?**Simulate** **Pipeline** **API**(模擬管道 **API**)針對 **request**?**body**(請求正文)中提供的一組 **documents**(文檔)執行指定的 **pipeline**(管道)。 您可以指定一個現有的 **pipeline**(管道)來執行提供的 **documents**(文檔),也可以在 **request** **body**(請求正文)中提供 **pipeline** **definition**(管道定義)。 以下是 **request** **body** 中提供的?**pipeline** **definition**(管道定義)和?**simulate** **request**(模擬請求)的結構 :? ``` POST _ingest/pipeline/_simulate { "pipeline" : { // pipeline definition here }, "docs" : [ { /** first document **/ }, { /** second document **/ }, // ... ] } ``` 以下是針對現有 **pipeline**(管道)的 **simulate**?**request**(模擬請求)的結構 :? ``` POST _ingest/pipeline/my-pipeline-id/_simulate { "docs" : [ { /** first document **/ }, { /** second document **/ }, // ... ] } ``` 以下是 **request**(請求)中??**pipeline**?**definition**(管道定義)的?**simulate**?**request**(模擬請求)及其 **response**(響應)的示例?:? ``` curl -XPOST 'localhost:9200/_ingest/pipeline/_simulate?pretty' -H 'Content-Type: application/json' -d' { "pipeline" : { "description": "_description", "processors": [ { "set" : { "field" : "field2", "value" : "_value" } } ] }, "docs": [ { "_index": "index", "_type": "type", "_id": "id", "_source": { "foo": "bar" } }, { "_index": "index", "_type": "type", "_id": "id", "_source": { "foo": "rab" } } ] } ' ``` **Response**(響應):? ``` { "docs": [ { "doc": { "_id": "id", "_ttl": null, "_parent": null, "_index": "index", "_routing": null, "_type": "type", "_timestamp": null, "_source": { "field2": "_value", "foo": "bar" }, "_ingest": { "timestamp": "2016-01-04T23:53:27.186+0000" } } }, { "doc": { "_id": "id", "_ttl": null, "_parent": null, "_index": "index", "_routing": null, "_type": "type", "_timestamp": null, "_source": { "field2": "_value", "foo": "rab" }, "_ingest": { "timestamp": "2016-01-04T23:53:27.186+0000" } } } ] } ``` ### Viewing Verbose Results 您可以使用 **simulate** **pipeline** **API**(模擬管道?**API**)來了解每個 **processor**(處理器)是如何來處理 **ingest** **document** 經過 **pipeline**(管道)時的細節的。要在 **simulate**?**request**(模擬請求)中查看每個 **processor**(處理器)的中間結果,可以將該參數 **verbose?**添加到 **request**(請求)中。 以下是一個 **verbose****request**(詳細請求)及其 **response**(響應)的示例 :? ``` curl -XPOST 'localhost:9200/_ingest/pipeline/_simulate?verbose&pretty' -H 'Content-Type: application/json' -d' { "pipeline" : { "description": "_description", "processors": [ { "set" : { "field" : "field2", "value" : "_value2" } }, { "set" : { "field" : "field3", "value" : "_value3" } } ] }, "docs": [ { "_index": "index", "_type": "type", "_id": "id", "_source": { "foo": "bar" } }, { "_index": "index", "_type": "type", "_id": "id", "_source": { "foo": "rab" } } ] } ' ``` **Response**(響應):? ``` { "docs": [ { "processor_results": [ { "tag": "processor[set]-0", "doc": { "_id": "id", "_ttl": null, "_parent": null, "_index": "index", "_routing": null, "_type": "type", "_timestamp": null, "_source": { "field2": "_value2", "foo": "bar" }, "_ingest": { "timestamp": "2016-01-05T00:02:51.383+0000" } } }, { "tag": "processor[set]-1", "doc": { "_id": "id", "_ttl": null, "_parent": null, "_index": "index", "_routing": null, "_type": "type", "_timestamp": null, "_source": { "field3": "_value3", "field2": "_value2", "foo": "bar" }, "_ingest": { "timestamp": "2016-01-05T00:02:51.383+0000" } } } ] }, { "processor_results": [ { "tag": "processor[set]-0", "doc": { "_id": "id", "_ttl": null, "_parent": null, "_index": "index", "_routing": null, "_type": "type", "_timestamp": null, "_source": { "field2": "_value2", "foo": "rab" }, "_ingest": { "timestamp": "2016-01-05T00:02:51.384+0000" } } }, { "tag": "processor[set]-1", "doc": { "_id": "id", "_ttl": null, "_parent": null, "_index": "index", "_routing": null, "_type": "type", "_timestamp": null, "_source": { "field3": "_value3", "field2": "_value2", "foo": "rab" }, "_ingest": { "timestamp": "2016-01-05T00:02:51.384+0000" } } } ] } ] } ```
                  <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>

                              哎呀哎呀视频在线观看