I want to set “_id” value in Elasticsearch document as my custom document id,
using this from kibana?
POST example/_doc
{
"_id":123,
"firstName":"Sera",
"lastName":"Zuck"
}
for this what i need to do ? should i have to modify the source code or should i have to include something else in connector?
PS: i dont want the _id feild to be autogenerated, i want to pass it as request. I am working with confluent 7.6.0, elasticSearch 8.12.2 , kibana 8.12.2
Hi @dadoonet
Thank you for your response.
I wanted to seek clarification regarding the use of /_doc/something. Our current connector seems to require a different format, and I want to make sure I'm not missing any crucial details.
Could you please provide additional information or guide me on the preferred format for our connector?
You don't need to modify the source code or add anything extra to the connector. Just ensure your Kafka message key contains the custom _id you want for your Elasticsearch document. The connector configuration you provided is already set up to use the Kafka message key as the Elasticsearch document _id with "key.ignore": "false" . Make sure your Kafka messages are produced with the correct key that represents your custom _id .
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.