Mongoosastic - indexing ObjectId into elastic search
The _id
is not within _source
object with all other fields returned by Elasticsearch
, but inside the parent hit
object.There is no need to specify _id
in the model definition, as it's included in the model by default.