# Row and match count in elasticsearch

**URL:** <https://discuss.elastic.co/t/row-and-match-count-in-elasticsearch/191238>\
**Category:** Elasticsearch\
**Created:** [July 18, 2019, 3:55pm UTC](https://discuss.elastic.co/t/row-and-match-count-in-elasticsearch/191238 "2019-07-18T15:55:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mansirajora01](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@mansirajora01](https://discuss.elastic.co/u/mansirajora01)\
**Post date:** [July 18, 2019, 3:55pm UTC](https://discuss.elastic.co/t/row-and-match-count-in-elasticsearch/191238/1 "2019-07-18T15:55:44Z")

</div>

Suppose I have a data in this format .  
POST /bookdb\_index/book/\_bulk  
{ "index": { "\_id": 1 }}  
{ "title": "Elasticsearch: The Definitive Guide", "authors": ["clinton gormley", "zachary tong"], "summary" : "A distibuted real-time search and analytics engine", "publish\_date" : "2015-02-07", "num\_reviews": 20, "publisher": "oreilly" }  
{ "index": { "\_id": 2 }}  
{ "title": "Taming Text: How to Find, Organize, and Manipulate It", "authors": ["grant ingersoll", "thomas morton", "drew farris"], "summary" : "organize text using approaches such as full-text search, proper name recognition, clustering, tagging, information extraction, and summarization", "publish\_date" : "2013-01-24", "num\_reviews": 12, "publisher": "manning" }  
{ "index": { "\_id": 3 }}  
{ "title": "Elasticsearch in Action", "authors": ["radu gheorge", "matthew lee hinman", "roy russo"], "summary" : "build scalable search applications using Elasticsearch without having to do complex low-level programming or understand advanced data science algorithms", "publish\_date" : "2015-12-03", "num\_reviews": 18, "publisher": "manning" }  
{ "index": { "\_id": 4 }}  
{ "title": "Solr in Action", "authors": ["trey grainger", "timothy potter"], "summary" : "Comprehensive guide to implementing a scalable search engine using Apache Solr", "publish\_date" : "2014-04-05", "num\_reviews": 23, "publisher": "manning" }.

I want to search text having guide in it .Instead of returning the whole document i want to have only those fields that contain the text query

GET /bookdb\_index/book/\_search?q=guide

when i run this it return me whole document .however i want to return only those fields that contain guide  
like in id 4 in summary guide is there so only summary field return and in id 1 in title guide is there so only title is return

---

<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:** [August 15, 2019, 3:55pm UTC](https://discuss.elastic.co/t/row-and-match-count-in-elasticsearch/191238/2 "2019-08-15T15:55:47Z")

</div>

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