2017-12-01 22 views
0

私はgsubパイプラインを作成しようとしていますが、私はそれをシミュレートする前にインターネット上の多くの例を参考にしています。ここに私のコードは次のとおりです。私はそれを実行したときにパイプラインをシミュレートしようとしたときにエラーが発生しました

PUT _ingest/pipeline/removescript/_simulate 
{ 
    "pipeline" :{ 
    "description": "remove script", 
    "processors": [ 
     { "gsub" :{ 
     "field": "content", 
     "pattern": "(?:..)[^<%]+[^%>](?:..)", 
     "replacement": "" 
     } 
     }] 
    }, 
    "docs": [ 
    { 
     "_id": "tt", 
     "_source": { 
     "content": "leave <% remove me %> Me" 
     } 
    }] 
} 

は、しかし、私は次のエラーが表示されます

No handler found for uri [/_ingest/pipeline/removescript/_simulate] and method [PUT]

私はあることをPUTラインを変更した場合: PUT _ingest/pipeline/_simulateまたはPUT _ingest/pipeline/removescript

その後、私は受け取ります次のエラー:

{ 
    "error": { 
    "root_cause": [ 
     { 
     "type": "parse_exception", 
     "reason": "[processors] required property is missing", 
     "header": { 
      "property_name": "processors" 
     } 
     } 
    ], 
    "type": "parse_exception", 
    "reason": "[processors] required property is missing", 
    "header": { 
     "property_name": "processors" 
    } 
    }, 
    "status": 400 
} 

答えて

1

_simulate endpointPOSTないPUTでのみ動作:これで

POST _ingest/pipeline/removescript/_simulate 
{ 
    ... 
} 
+0

どれでも運が? – Val

関連する問題