# Elasticsearch not returning mongoose object id

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-returning-mongoose-object-id/118558>\
**Category:** Elasticsearch\
**Created:** [February 6, 2018, 5:31am UTC](https://discuss.elastic.co/t/elasticsearch-not-returning-mongoose-object-id/118558 "2018-02-06T05:31:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moumita\_Mandal](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Moumita\_Mandal](https://discuss.elastic.co/u/Moumita_Mandal)\
**Post date:** [February 6, 2018, 5:31am UTC](https://discuss.elastic.co/t/elasticsearch-not-returning-mongoose-object-id/118558/1 "2018-02-06T05:31:15Z")

</div>

Hi,

Currently, I am using Elasticsearch version "5.3.2".I am developing an application in Nodejs and MongoDB(For Elasticsearch I am using mongoosastic npm module).

I am performing a search query which is working fine.  
The problem is search result is not returning the Object Id(mongoose object id) and other fields like createdAt and updatedAt.

Please help me to solve this problem.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 7, 2018, 9:32am UTC](https://discuss.elastic.co/t/elasticsearch-not-returning-mongoose-object-id/118558/2 "2018-02-07T09:32:39Z")

</div>

Hey,

you might have more luck asking this in the mongoose forums, as this sounds very mongoose specific to me, finding out why certain fields are included in mongoose or not.

--Alex

---

<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:** [March 7, 2018, 9:32am UTC](https://discuss.elastic.co/t/elasticsearch-not-returning-mongoose-object-id/118558/3 "2018-03-07T09:32:44Z")

</div>

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