# Can I create an Elastic Search index manually against an existing mongodb collection?

**URL:** <https://discuss.elastic.co/t/can-i-create-an-elastic-search-index-manually-against-an-existing-mongodb-collection/248383>\
**Category:** Elasticsearch\
**Created:** [September 11, 2020, 8:45pm UTC](https://discuss.elastic.co/t/can-i-create-an-elastic-search-index-manually-against-an-existing-mongodb-collection/248383 "2020-09-11T20:45:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Pablo\_Realini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan_pablo_realini/32/75456_2.png) [@Juan\_Pablo\_Realini](https://discuss.elastic.co/u/Juan_Pablo_Realini)\
**Post date:** [September 11, 2020, 8:45pm UTC](https://discuss.elastic.co/t/can-i-create-an-elastic-search-index-manually-against-an-existing-mongodb-collection/248383/1 "2020-09-11T20:45:44Z")

</div>

Hi.. I am new to ES, and have some very specific scenario I would like to achieve.  
I am an SDET testing a web app (Blazor / Mongo). For one of my tests I need to seed the db with 5000 records... before they implemented Elastic Search in the project, I would just seed the db by hitting it using MongodbClient from my code, but now I need to seed it using an endpoint they provided, where I have to create each record one by one... and it takes forever...  
So, I had an idea which I am not sure is possible.

1. I seed the 5000 records using the endpoint
2. I visit the index endpoint (localhost:9200/index) and copy the json for that index
3. Now, next time I need to run the tests, I will seed the 5000 records using MongodbClient and then create the index manually (PUT index and the json I got from the index in step 2)

I tried it, the index gets created, but I can't see the data in the UI... (already using the ES index)  
Is there a way to achieve this?

Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 12, 2020, 8:00am UTC](https://discuss.elastic.co/t/can-i-create-an-elastic-search-index-manually-against-an-existing-mongodb-collection/248383/2 "2020-09-12T08:00:36Z")

</div>

Are you sending a bulk request with the data to Elasticsearch? If so, is it correctly formatted?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 10, 2020, 8:00am UTC](https://discuss.elastic.co/t/can-i-create-an-elastic-search-index-manually-against-an-existing-mongodb-collection/248383/3 "2020-10-10T08:00:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
