英文:
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"时,它给出了下面显示的错误。
是否可以使用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.
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论