Step 1 – Go to: http://www.json-generator.com/
[
'{{repeat(1000, 1000)}}',
{
name: '{{firstName()}} {{surname()}}',
age: '{{integer(18, 75)}}',
gender: '{{gender()}}',
email: '{{email()}}',
phone: '+1 {{phone()}}',
street: '{{integer(100, 999)}} {{street()}}',
city: '{{city()}}',
state: '{{state()}}, {{integer(100, 10000)}}'
}
]Code language: JavaScript (javascript)
Step 2 – Download and save as customers_full.json
Step 3 – Open customers_full.json in sublimetext
- Remove the array brackets
- Find-Replace },{ with }\n{ in the regex mode on sublime text
- Find-Replace {“name” with {“index” : {}}\n{“name” in the regex model on sublime text
Now the file is in a format that can be parsed by elastic search.
curl -H "Content-Type: application/x-ndjson" -XPOST 'localhost:9200/customers/personal/_bulk?pretty&refresh' --data-binary @"customers_full.json"
curl -XGET 'localhost:9200/_cat/indices?v&pretty'Code language: JavaScript (javascript)I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals