How to insert data into elasticsearch

后端 未结 7 2084
情深已故
情深已故 2020-12-23 14:47

I am new to Elasticearch, and I have been trying for 2 days to insert some data into Elasticearch. I found on Google that there are many pages to help to create an index (I

7条回答
  •  一向
    一向 (楼主)
    2020-12-23 14:58

    To test and try curl requests from Windows, you can make use of Postman client Chrome extension. It is very simple to use and quite powerful.

    Or as suggested you can install the cURL util.

    A sample curl request is as follows.

    curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
    "user" : "Arun Thundyill Saseendran",
    "post_date" : "2009-03-23T12:30:00",
    "message" : "trying out Elasticsearch"
    }' "http://10.103.102.56:9200/sampleindex/sampletype/"
    

    I am also getting started with and exploring ES in vast. So please let me know if you have any other doubts.

    EDIT: Updated the index name and type name to be fully lowercase to avoid errors and follow convention.

提交回复
热议问题