# Boost query in elasticsearch

**URL:** <https://discuss.elastic.co/t/boost-query-in-elasticsearch/17366>\
**Category:** Elasticsearch\
**Created:** [May 6, 2014, 11:57am UTC](https://discuss.elastic.co/t/boost-query-in-elasticsearch/17366 "2014-05-06T11:57:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Pinsard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexandre_pinsard/32/1592_2.png) [@Alexandre\_Pinsard](https://discuss.elastic.co/u/Alexandre_Pinsard)\
**Post date:** [May 6, 2014, 11:57am UTC](https://discuss.elastic.co/t/boost-query-in-elasticsearch/17366/1 "2014-05-06T11:57:17Z")

</div>

Hello everybody,  
i would like to use boost in the case :

I have a personal index that contains the following properties:

- sname
- fname
- login

When I do research on fname= 'toto' and sname = 't' I would like my results  
are sorted by relevance. For example :

- Toto tata
- Toto tutu
- Toto tttttt
- Totoaaaa Tutfut
- etc...

But I do not know how to deal with boost. Can you help me please ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7102e10a-a5a2-492e-8f42-7a2b4820f4d9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7102e10a-a5a2-492e-8f42-7a2b4820f4d9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Hannes\_Korte](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hannes_korte/32/909_2.png) [@Hannes\_Korte](https://discuss.elastic.co/u/Hannes_Korte)\
**Post date:** [May 6, 2014, 12:19pm UTC](https://discuss.elastic.co/t/boost-query-in-elasticsearch/17366/2 "2014-05-06T12:19:40Z")

</div>

Hi Alexandre,

did you have a look at the cross\_fields type of the multi match query?

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Using an edge\_ngram analyzer this might already solve your problem even  
without the need for fine-tuning a boost value.

Best regards,  
Hannes

On 06.05.2014 13:57, Alexandre Pinsard wrote:

> Hello everybody,  
> i would like to use boost in the case :
> 
> I have a personal index that contains the following properties:
> 
> ```
> - sname
> - fname
> - login
> 
> ```
> 
> When I do research on fname= 'toto' and sname = 't' I would like my results  
> are sorted by relevance. For example :
> 
> ```
> - Toto tata
> - Toto tutu
> - Toto tttttt
> - Totoaaaa Tutfut
> - etc...
> 
> ```
> 
> But I do not know how to deal with boost. Can you help me please ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5368D35C.60109%40hkorte.com](https://groups.google.com/d/msgid/elasticsearch/5368D35C.60109%40hkorte.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:31am UTC](https://discuss.elastic.co/t/boost-query-in-elasticsearch/17366/3 "2017-07-06T01:31:22Z")

</div>


