# termQuery doesn't support string only contains letters?

**URL:** <https://discuss.elastic.co/t/termquery-doesnt-support-string-only-contains-letters/4608>\
**Category:** Elasticsearch\
**Created:** [June 10, 2011, 10:28pm UTC](https://discuss.elastic.co/t/termquery-doesnt-support-string-only-contains-letters/4608 "2011-06-10T22:28:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kun\_Niu](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kun\_Niu](https://discuss.elastic.co/u/Kun_Niu)\
**Post date:** [June 10, 2011, 10:28pm UTC](https://discuss.elastic.co/t/termquery-doesnt-support-string-only-contains-letters/4608/1 "2011-06-10T22:28:28Z")

</div>

Hi all,  
I'm writing a Java program using Transport client to connect to  
elasticsearch server. I created an index with field "event" and I  
provided two value "0000" and "desc". It seems that each time I use  
termQuery to search for "0000", I can find the result. But if I use  
termQuery to search for "desc", I can not find anything. I'm using the  
latest JDK and windows 7 32-bit. I also use elasticsearch 0.16.2.

Thanks for your attention and look forward to your reply.

---

<div class="post-metadata">

**Author:** ![Kun\_Niu](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kun\_Niu](https://discuss.elastic.co/u/Kun_Niu)\
**Post date:** [June 10, 2011, 10:47pm UTC](https://discuss.elastic.co/t/termquery-doesnt-support-string-only-contains-letters/4608/2 "2011-06-10T22:47:19Z")

</div>

After searching for the group, it seems that TextQueryBuilder meets my  
requirement.

On Jun 10, 3:28 pm, kun niu [haoniu...@gmail.com](mailto:haoniu...@gmail.com) wrote:

> Hi all,  
> I'm writing a Java program using Transport client to connect to  
> elasticsearch server. I created an index with field "event" and I  
> provided two value "0000" and "desc". It seems that each time I use  
> termQuery to search for "0000", I can find the result. But if I use  
> termQuery to search for "desc", I can not find anything. I'm using the  
> latest JDK and windows 7 32-bit. I also use elasticsearch 0.16.2.
> 
> Thanks for your attention and look forward to your reply.

---

<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, 4:03am UTC](https://discuss.elastic.co/t/termquery-doesnt-support-string-only-contains-letters/4608/3 "2017-07-06T04:03:48Z")

</div>


