我想通过提供Elasticsearch URL,通过Nifi从Elasticsearch中删除数据。

huangapple go评论70阅读模式
英文:

I want to delete data from elasticsearch through nifi by providing url of elasticsearch url

问题

使用Apache NiFi的putelasticsearchhttp处理器,我能够通过提供Elasticsearch URL将数据放入我的Elasticsearch中。现在我想要从我的Elasticsearch中删除和更新数据,为此,当我在putelasticsearchhttp处理器的index operation参数中写入"delete"时,它给出了下面显示的错误。

我想通过提供Elasticsearch URL,通过Nifi从Elasticsearch中删除数据。

是否可以使用Apache NiFi的putelasticsearchhttp处理器删除Elasticsearch数据?如果可以,那么如何操作?如果不行,那么我应该使用哪个处理器以及如何操作?

请注意,我正在使用Elasticsearch URL来访问Elasticsearch,它不在我的本地运行。

英文:

Using putelasticsearchhttp processor of apache nifi I'm able to put data in my elastic search by providing elasticsearch url. Now I want to delete and update data from my elastic search and for that when I'm writing delete in index operation parameter of putelasticsearchhttp processor then it is giving me error shown below.

我想通过提供Elasticsearch URL,通过Nifi从Elasticsearch中删除数据。

Is it possible to delete the elastic search data using putelasticsearchhttp processor of apache nifi if yes then how and if no then what processor should I use and how?

Keep in mind that I'm using elasticsearch url to access elastic search and it is not running in my local.

答案1

得分: 2

对于“delete”操作,处理器需要知道要删除的文档的标识符。它使用“标识符属性”来确定要删除的文档的标识符。确保您的FlowFile具有一个属性(我们称之为es.doc.id),并且它包含要删除的文档的标识符。然后将PutElasticsearchHttp中的“标识符属性”属性值设置为es.doc.id

请注意,在较新版本的NiFi中,PutElasticsearchHttp已被弃用,推荐使用PutElasticsearchJson,因此在将来的(主要)发布中可能会被移除。

英文:

For delete operations, the processor needs to know the identifier of the document in order to delete it. It uses the Identifier Attribute property to determine the identifier of the document to delete. Ensure your FlowFile has an attribute (let's call it es.doc.id) and it contains the identifier of the document to delete. Then set the value of the Identifier Attribute property in PutElasticsearchHttp to es.doc.id.

Please note that in newer versions of NiFi, PutElasticsearchHttp has been deprecated in favor of PutElasticsearchJson, and thus it may be removed in a future (major) release.

huangapple
  • 本文由 发表于 2023年7月24日 19:04:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/76753839.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定