# Unable to give

**URL:** <https://discuss.elastic.co/t/unable-to-give/9221>\
**Category:** Elasticsearch\
**Created:** [October 3, 2012, 8:21am UTC](https://discuss.elastic.co/t/unable-to-give/9221 "2012-10-03T08:21:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashwantborse](https://avatars.discourse-cdn.com/v4/letter/y/90ced4/32.png) [@yashwantborse](https://discuss.elastic.co/u/yashwantborse)\
**Post date:** [October 3, 2012, 8:21am UTC](https://discuss.elastic.co/t/unable-to-give/9221/1 "2012-10-03T08:21:36Z")

</div>

Hi ,  
I implemented the elasticsearch facet in java, when I search a particular field (by using termQuery) eg title then it only give the first word of title by using termfacet. please help me.  
The output of searchresponse and hits are ,

Searchresponse {  
"took" : 125,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"hits" : {  
"total" : 2,  
"max\_score" : 1.2702225,  
"hits" : [ {  
"\_shard" : 0,  
"\_node" : "NG7CXPXzSi-ziA-8gU\_ApQ",  
"\_index" : "test",  
"\_type" : "doc",  
"\_id" : "3",  
"\_score" : 1.2702225, "\_source" : {"file":"title :XML Developer's Guide"},  
"\_explanation" : {  
"value" : 1.2702225,  
"description" : "fieldWeight(file:title in 2), product of:",  
"details" : [ {  
"value" : 1.0,  
"description" : "tf(termFreq(file:title)=1)"  
}, {  
"value" : 2.540445,  
"description" : "idf(docFreq=2, maxDocs=14)"  
}, {  
"value" : 0.5,  
"description" : "fieldNorm(field=file, doc=2)"  
} ]  
}  
}, {  
"\_shard" : 0,  
"\_node" : "NG7CXPXzSi-ziA-8gU\_ApQ",  
"\_index" : "test",  
"\_type" : "doc",  
"\_id" : "10",  
"\_score" : 1.2702225, "\_source" : {"file":"title :Midnight Rain"},  
"\_explanation" : {  
"value" : 1.2702225,  
"description" : "fieldWeight(file:title in 9), product of:",  
"details" : [ {  
"value" : 1.0,  
"description" : "tf(termFreq(file:title)=1)"  
}, {  
"value" : 2.540445,  
"description" : "idf(docFreq=2, maxDocs=14)"  
}, {  
"value" : 0.5,  
"description" : "fieldNorm(field=file, doc=9)"  
} ]  
}  
} ]  
},  
"facets" : {  
"facet1" : {  
"\_type" : "terms",  
"missing" : 0,  
"total" : 7,  
"other" : 0,  
"terms" : [ {  
"term" : "title",  
"count" : 2  
}, {  
"term" : "xml",  
"count" : 1  
}, {  
"term" : "rain",  
"count" : 1  
}, {  
"term" : "midnight",  
"count" : 1  
}, {  
"term" : "guide",  
"count" : 1  
}, {  
"term" : "developer's",  
"count" : 1  
} ]  
}  
}  
}  
Total hits are 6  
xml(1)  
rain(1)  
midnight(1)  
guide(1)  
developer's(1)

---

<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:** [July 6, 2017, 3:10am UTC](https://discuss.elastic.co/t/unable-to-give/9221/2 "2017-07-06T03:10:25Z")

</div>


