Is there a way so that I get only the data present in _source of my Document & not any other metadata like _index,_type,_id,_score while retrieving it from Index?
1 Answer
I got it how to do it.
GET /<index>/<type>/<id>/_source
will return only _source field.
Example:
Create a document with ID 123
PUT /website/blog/123
{
"title": "My first blog entry",
"text": "Just trying this out...",
"date": "2014/01/01"
}
To Retrieve just the _source field
GET /website/blog/123/_source
returned:
{
"title": "My first blog entry",
"text": "Just trying this out...",
"date": "2014/01/01"
}
1 Comment
Sudhanshu Gaur
how to do this in mongoosastic or npm elasticsearch module ??