# Query Number Not Match

**URL:** <https://discuss.elastic.co/t/query-number-not-match/9183>\
**Category:** Elasticsearch\
**Created:** [September 28, 2012, 4:38am UTC](https://discuss.elastic.co/t/query-number-not-match/9183 "2012-09-28T04:38:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zkidkid](https://avatars.discourse-cdn.com/v4/letter/z/fbc32d/32.png) [@zkidkid](https://discuss.elastic.co/u/zkidkid)\
**Post date:** [September 28, 2012, 4:38am UTC](https://discuss.elastic.co/t/query-number-not-match/9183/1 "2012-09-28T04:38:11Z")

</div>

Hi,

I have a problem of query number as String.

My Config :

default:  
tokenizer: whitespace  
filter: [asciifolding, lowercase]

When I index a field:

ex: "price" : "123, 456, 789,"

I make a query search

TextQueryBuilder txtQuery = QueryBuilders.textPhrasePrefixQuery("price",  
"123");

But it show nothing.

Text is work ok, but number is not.  
I think the filter asciifolding has remove the number but I'm not sure.

What should I do to search with number like this case ?

Thanks.

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 28, 2012, 4:52am UTC](https://discuss.elastic.co/t/query-number-not-match/9183/2 "2012-09-28T04:52:16Z")

</div>

You could change your mapping for this field and use another analyzer or no analyzer at all.

HTH

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 sept. 2012 à 06:38, kidkid [zkidkid@gmail.com](mailto:zkidkid@gmail.com) a écrit :

> Hi,
> 
> I have a problem of query number as String.
> 
> My Config :
> 
> default:  
> tokenizer: whitespace  
> filter: [asciifolding, lowercase]
> 
> When I index a field:
> 
> ex: "price" : "123, 456, 789,"
> 
> I make a query search
> 
> TextQueryBuilder txtQuery = QueryBuilders.textPhrasePrefixQuery("price", "123");
> 
> But it show nothing.
> 
> Text is work ok, but number is not.  
> I think the filter asciifolding has remove the number but I'm not sure.
> 
> What should I do to search with number like this case ?
> 
> ## Thanks.

--

---

<div class="post-metadata">

**Author:** ![zkidkid](https://avatars.discourse-cdn.com/v4/letter/z/fbc32d/32.png) [@zkidkid](https://discuss.elastic.co/u/zkidkid)\
**Post date:** [September 28, 2012, 7:18am UTC](https://discuss.elastic.co/t/query-number-not-match/9183/3 "2012-09-28T07:18:52Z")

</div>

Hi,  
I need asciifolding to process special symbol like "a, ă, â, ấ, à, ạ ã ..."  
it work rigth with text.  
If a price is number field then the search ok.

Is it another query or another solution ?

On Friday, September 28, 2012 11:52:28 AM UTC+7, David Pilato wrote:

> You could change your mapping for this field and use another analyzer or  
> no analyzer at all.
> 
> HTH
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 28 sept. 2012 à 06:38, kidkid \<[zki...@gmail.com](mailto:zki...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Hi,
> 
> I have a problem of query number as String.
> 
> My Config :
> 
> default:  
> tokenizer: whitespace  
> filter: [asciifolding, lowercase]
> 
> When I index a field:
> 
> ex: "price" : "123, 456, 789,"
> 
> I make a query search
> 
> TextQueryBuilder txtQuery = QueryBuilders.textPhrasePrefixQuery("price",  
> "123");
> 
> But it show nothing.
> 
> Text is work ok, but number is not.  
> I think the filter asciifolding has remove the number but I'm not sure.
> 
> What should I do to search with number like this case ?
> 
> Thanks.
> 
> --

--

---

<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:11am UTC](https://discuss.elastic.co/t/query-number-not-match/9183/4 "2017-07-06T03:11:00Z")

</div>


