# Complex search

**URL:** <https://discuss.elastic.co/t/complex-search/21672>\
**Category:** Elasticsearch\
**Created:** [January 15, 2015, 9:19pm UTC](https://discuss.elastic.co/t/complex-search/21672 "2015-01-15T21:19:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serge\_Schumacher](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@Serge\_Schumacher](https://discuss.elastic.co/u/Serge_Schumacher)\
**Post date:** [January 15, 2015, 9:19pm UTC](https://discuss.elastic.co/t/complex-search/21672/1 "2015-01-15T21:19:08Z")

</div>

Hi,  
I'm looking to create a search behaviour like Amazon does.

I have an index with 3 Fields : Title, Description and Category.

I want to search in the fields title and descriptions for the word "_car_"  
and I would like to get scored result like this :

car --\> score : 1 in category vehicles  
autocar --\> score : 0,5 in category vehicles where the part "car" should  
highlighted ex : auto_car_  
carradio --\> core : 0,5 in category vehicles where the part "car" should  
highlighted ex : _car_radio

and that if the word is found in the title field, the score should be  
higher as if the word would only be found in the description field.

Is anybody out there who could help me on this topic or at least point me  
to the right direction where I should look for ?

Thanks,  
Serge

--  
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/3f5e7d15-74c2-49ab-bc8f-231d01899fa4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3f5e7d15-74c2-49ab-bc8f-231d01899fa4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Russ\_Cam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/russ_cam/32/895_2.png) [@Russ\_Cam](https://discuss.elastic.co/u/Russ_Cam)\
**Post date:** [January 16, 2015, 2:50am UTC](https://discuss.elastic.co/t/complex-search/21672/2 "2015-01-16T02:50:41Z")

</div>

Take a look at highlighting  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html) for  
highlighting the relevant parts of matches and at multifield  
[http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/multi-match-query.html#\_boosting\_individual\_fields](http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/multi-match-query.html#_boosting_individual_fields)search  
queries with boosting on individual fields.

On Friday, 16 January 2015 08:19:08 UTC+11, Serge Schumacher wrote:

> Hi,  
> I'm looking to create a search behaviour like Amazon does.
> 
> I have an index with 3 Fields : Title, Description and Category.
> 
> I want to search in the fields title and descriptions for the word "_car_"  
> and I would like to get scored result like this :
> 
> car --\> score : 1 in category vehicles  
> autocar --\> score : 0,5 in category vehicles where the part "car"  
> should highlighted ex : auto_car_  
> carradio --\> core : 0,5 in category vehicles where the part "car" should  
> highlighted ex : _car_radio
> 
> and that if the word is found in the title field, the score should be  
> higher as if the word would only be found in the description field.
> 
> Is anybody out there who could help me on this topic or at least point me  
> to the right direction where I should look for ?
> 
> Thanks,  
> Serge

--  
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/c1b4e9e2-f84b-4b72-bdda-0b22a8584658%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c1b4e9e2-f84b-4b72-bdda-0b22a8584658%40googlegroups.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, 12:38am UTC](https://discuss.elastic.co/t/complex-search/21672/3 "2017-07-06T00:38:31Z")

</div>


