# How to include numbers in search

**URL:** <https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064>\
**Category:** Elasticsearch\
**Created:** [September 19, 2012, 1:21pm UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064 "2012-09-19T13:21:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikeNereson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikenereson/32/2632_2.png) [@MikeNereson](https://discuss.elastic.co/u/MikeNereson)\
**Post date:** [September 19, 2012, 1:21pm UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064/1 "2012-09-19T13:21:39Z")

</div>

Hello.

Numbers aren't searchable. It seems they are being filtered out by a search  
analyzer?

For example, I have indexed content "_In December of 2008 the local  
government voted to allow..._"

Searching for "December" works as expected. Searching for "2008" does not.

My configuration is pretty simple.

cluster:  
name: es-dev-cluster  
node:  
master: true  
data: true  
network.host: 127.0.0.1  
transport.tcp.port: xxxx  
http.port: xxxx  
action.auto\_create\_index: true  
index.mapper.dynamic: false  
gateway:  
type: s3  
s3.bucket: xxx-xxx-elasticsearch  
cloud:  
aws:  
access\_key: xxx  
secret\_key: xxx

{  
"searchable":{  
"type":"object",  
"properties":{  
"entityId":{  
"type":"integer",  
"store":"yes"  
},  
"anotherId":{  
"type":"integer",  
"store":"yes"  
},  
"title":{  
"type":"string",  
"store":"yes",  
"index":"analyzed",  
"boost":"15.0",  
"analyzer":"simple",  
"search\_analyzer":"simple"  
},  
"keywords":{  
"type":"string",  
"store":"yes",  
"index":"analyzed",  
"boost":"14.0",  
"analyzer":"simple",  
"search\_analyzer":"simple"  
},  
"description":{  
"type":"string",  
"store":"yes",  
"index":"analyzed",  
"boost":"12.0",  
"analyzer":"simple",  
"search\_analyzer":"simple"  
},  
"text-content":{  
"type":"string",  
"store":"yes",  
"index":"analyzed",  
"boost":"11.0",  
"analyzer":"simple",  
"search\_analyzer":"simple"  
},  
"audio-content":{  
"type":"string",  
"store":"yes",  
"index":"analyzed",  
"boost":"4.0",  
"analyzer":"simple",  
"search\_analyzer":"simple"  
},  
"screen-content":{  
"type":"string",  
"store":"yes",  
"index":"analyzed",  
"boost":"1.0",  
"analyzer":"simple",  
"search\_analyzer":"simple"  
}  
}  
}  
}

I would guess my searchable definition needs to be modified?

Thank you.

--

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [September 19, 2012, 1:28pm UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064/2 "2012-09-19T13:28:38Z")

</div>

Hiya

> Numbers aren't searchable. It seems they are being filtered out by a  
> search analyzer?
> 
> For example, I have indexed content "In December of 2008 the local  
> government voted to allow..."
> 
> Searching for "December" works as expected. Searching for "2008" does  
> not.
> 
> My configuration is pretty simple.

> I would guess my searchable definition needs to be modified?

Yes, use the standard analyzer, not the simple analyzer

clint

--

---

<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 19, 2012, 1:34pm UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064/3 "2012-09-19T13:34:37Z")

</div>

Hi Clint,

Just curious: how do you know that Mike used the simple analyzer?

David.

Le 19 septembre 2012 à 15:28, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com) a écrit :

> Hiya
> 
> > Numbers aren't searchable. It seems they are being filtered out by a  
> > search analyzer?
> > 
> > For example, I have indexed content "In December of 2008 the local  
> > government voted to allow..."
> > 
> > Searching for "December" works as expected. Searching for "2008" does  
> > not.
> > 
> > My configuration is pretty simple.
> 
> > I would guess my searchable definition needs to be modified?
> 
> Yes, use the standard analyzer, not the simple analyzer
> 
> clint
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<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 19, 2012, 1:35pm UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064/4 "2012-09-19T13:35:52Z")

</div>

Oops.. Forget it !

I didn't see the end of its email !

Shame on me !

Le 19 septembre 2012 à 15:34, David Pilato [david@pilato.fr](mailto:david@pilato.fr) a écrit :

> Hi Clint,
> 
> Just curious: how do you know that Mike used the simple analyzer?
> 
> David.
> 
> Le 19 septembre 2012 à 15:28, Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com) a écrit  
> :
> 
> > Hiya
> > 
> > > Numbers aren't searchable. It seems they are being filtered out by a  
> > > search analyzer?
> > > 
> > > For example, I have indexed content "In December of 2008 the local  
> > > government voted to allow..."
> > > 
> > > Searching for "December" works as expected. Searching for "2008" does  
> > > not.
> > > 
> > > My configuration is pretty simple.
> > 
> > > I would guess my searchable definition needs to be modified?
> > 
> > Yes, use the standard analyzer, not the simple analyzer
> > 
> > clint
> > 
> > --
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![MikeNereson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikenereson/32/2632_2.png) [@MikeNereson](https://discuss.elastic.co/u/MikeNereson)\
**Post date:** [September 19, 2012, 2:02pm UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064/5 "2012-09-19T14:02:39Z")

</div>

Thanks, Clinton and David, for your time and expertise.

~ Mike Nereson

--

---

<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:12am UTC](https://discuss.elastic.co/t/how-to-include-numbers-in-search/9064/6 "2017-07-06T03:12:18Z")

</div>


