# Fwd: Highlight part of words

**URL:** <https://discuss.elastic.co/t/fwd-highlight-part-of-words/3998>\
**Category:** Elasticsearch\
**Created:** [February 28, 2011, 8:52pm UTC](https://discuss.elastic.co/t/fwd-highlight-part-of-words/3998 "2011-02-28T20:52:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Heimburger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_heimburger/32/2941_2.png) [@Alexandre\_Heimburger](https://discuss.elastic.co/u/Alexandre_Heimburger)\
**Post date:** [February 28, 2011, 8:52pm UTC](https://discuss.elastic.co/t/fwd-highlight-part-of-words/3998/1 "2011-02-28T20:52:36Z")

</div>

Hi,

Imagine that I query 'andr'

Alexandre and Andre are matching but both terms are fully highlighted. I  
would like to hightlight only the letter I typed.

Here is my mapping :

{  
"usr" : {  
"properties" : {  
"title" : {  
"type" : "multi\_field",  
"fields" : {  
"title" : {"type" : "string", "index" : "analyzed"},  
"raw" : {"type" : "string", "analyzer" :  
"lowercase\_keyword"}  
}  
}  
}  
}  
}

Here is the query :

array('query'=\>array('bool'=\> array(  
'must' =\>  
array("wildcard"=\>array('title.raw'=\>"_$str_")),  
'should' =\> $locTerms,  
'minimum\_number\_should\_match'=\> 1,  
'boost' =\> 1.0  
)  
),  
'highlight' =\>  
array('fields'=\>array('title'=\>array('number\_of\_fragments'=\>1)))  
);

Any clue ?

Thanks

--  
Alexandre Heimburger  
R&D Manager  
blueKiwi Software  
tel : +33687880997  
email : [ahb@bluekiwi-software.com](mailto:ahb@bluekiwi-software.com)  
adress : 93 rue Vieille du Temple, 75003 Paris

What is blueKiwi? blueKiwi - the first Enterprise Social Software Suite in  
the world building professional networks on conversations and relationships

- helps large organizations increase their productivity, foster innovations  
and boost people satisfaction.

---

<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:11am UTC](https://discuss.elastic.co/t/fwd-highlight-part-of-words/3998/2 "2017-07-06T04:11:15Z")

</div>


