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?
Asked
Active
Viewed 1,960 times
1
-
take a look at here:https://stackoverflow.com/questions/23283033/filter-out-metadata-fields-and-only-return-source-fields-in-elasticsearch – paxi Jul 14 '17 at 09:29
1 Answers
1
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"
}

BatScream
- 19,260
- 4
- 52
- 68

Tushar Khanna
- 428
- 6
- 22