# First word not get search with whitespace analyzer

**URL:** <https://discuss.elastic.co/t/first-word-not-get-search-with-whitespace-analyzer/8535>\
**Category:** Elasticsearch\
**Created:** [July 27, 2012, 7:08am UTC](https://discuss.elastic.co/t/first-word-not-get-search-with-whitespace-analyzer/8535 "2012-07-27T07:08:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijuitech](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vijuitech](https://discuss.elastic.co/u/vijuitech)\
**Post date:** [July 27, 2012, 7:08am UTC](https://discuss.elastic.co/t/first-word-not-get-search-with-whitespace-analyzer/8535/1 "2012-07-27T07:08:38Z")

</div>

Hi,  
I am using the analyzer as

"post" : { "type" : "string", "store" : "yes", "index" :  
"analyzed","analyzer":"whitespace", "boost" : 3.0 },

I indexed the following text in the post field: "Learn the latest  
about new and updated mobile products"

While searching the Text "Learn" from the post field I am not getting  
the results. but I can get the results while searching all other  
words.

How can I rectify this?

Thanks!

Cheers!

George

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [July 27, 2012, 4:32pm UTC](https://discuss.elastic.co/t/first-word-not-get-search-with-whitespace-analyzer/8535/2 "2012-07-27T16:32:03Z")

</div>

The whitespace analyzer does not lowercase the tokens. You would need  
to define a custom analyzer that uses a whitespace and lowecase  
filter.

curl '[http://localhost:9200/\_analyze?analyzer=whitespace&pretty=true](http://localhost:9200/_analyze?analyzer=whitespace&pretty=true)'  
-d 'Learn the latest  
about new and updated mobile products'

{  
"tokens" : [ {  
"token" : "Learn",  
"start\_offset" : 0,  
"end\_offset" : 5,  
"type" : "word",  
"position" : 1  
}, {  
"token" : "the",  
"start\_offset" : 6,  
"end\_offset" : 9,  
"type" : "word",  
"position" : 2  
}, ...

Ivan

On Fri, Jul 27, 2012 at 12:08 AM, George Viju [vijuitech@gmail.com](mailto:vijuitech@gmail.com) wrote:

> Hi,  
> I am using the analyzer as
> 
> "post" : { "type" : "string", "store" : "yes", "index" :  
> "analyzed","analyzer":"whitespace", "boost" : 3.0 },
> 
> I indexed the following text in the post field: "Learn the latest  
> about new and updated mobile products"
> 
> While searching the Text "Learn" from the post field I am not getting  
> the results. but I can get the results while searching all other  
> words.
> 
> How can I rectify this?
> 
> Thanks!
> 
> Cheers!
> 
> George

---

<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:18am UTC](https://discuss.elastic.co/t/first-word-not-get-search-with-whitespace-analyzer/8535/3 "2017-07-06T03:18:45Z")

</div>


