Use es client to call ingest simulate


(jiangguoqiang) #1

Hi.

I am use es client to communicate with elasticsearch.
All other interfaces works except es.ingest.simulate. My code is as follows:

    es.get({
      index: "website",
      type: "blog",
      id: "123"
    })
    .then(function (obj) {
        notify.error('jgq check get!');
    })
    .catch(notify.fatal);
    var param = {
      body: {
        "pipeline" :
        {
          "description": "_description",
          "processors": [
            {
              "set" : {
                "field" : "field2",
                "value" : "_value"
              }
            }
          ]
        },
        "docs": [
          {
            "_index": "index",
            "_type": "type",
            "_id": "id",
            "_source": {
              "foo": "bar"
            }
          }
        ]
      }
    };
    es.ingest.simulate(param)
    .then(function(response) {
      notify.error('jgq check simulate!');
    })
    .catch((err) => {
      notify.error('jgq check simulate fail!');
    });

The get interface succeed while the ingest.simulate failed, and the error I get is:

http://192.168.214.131:5601/zhn/elasticsearch/_ingest/pipeline/_simulate 404 (Not Found)

Any help would be appreciated!


(Tyler Smalley) #2

Currently there is not an ES proxy created for the ingest pipeline. You can see the proxy setup here.


(jiangguoqiang) #3

Thanks!


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.