# Tie\_breaker - way to exclude same field analyzed using different analyzers in multi\_field

**URL:** <https://discuss.elastic.co/t/tie-breaker-way-to-exclude-same-field-analyzed-using-different-analyzers-in-multi-field/129568>\
**Category:** Elasticsearch\
**Created:** [April 25, 2018, 8:44pm UTC](https://discuss.elastic.co/t/tie-breaker-way-to-exclude-same-field-analyzed-using-different-analyzers-in-multi-field/129568 "2018-04-25T20:44:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_Bagga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_bagga/32/15047_2.png) [@Atul\_Bagga](https://discuss.elastic.co/u/Atul_Bagga)\
**Post date:** [April 25, 2018, 8:44pm UTC](https://discuss.elastic.co/t/tie-breaker-way-to-exclude-same-field-analyzed-using-different-analyzers-in-multi-field/129568/1 "2018-04-25T20:44:31Z")

</div>

I have a mapping where name is analyzed using different analyzers standard, whitespace, custom (for camelcase) which makes it 3 different sub fields for name.

When I use tie\_breaker option in multimatch query to have sum of fields score rather than best\_field score the score from name field gets added multiple times since there are cases when all analyzers output will be same.

This causes the document score to go high due to one field match while other document with multiple field match in other fields which are not analyzed in multiple ways remains low.

{  
"title": {  
"type": "text",  
"fields": {  
"raw": { "type": "keyword", "index": "not\_analyzed" },  
"stemmed": { "type": "text", "analyzer": "Custom\_analyzer" }  
}  
},  
"description": {  
"type": "text",  
"analyzer": "custom\_analyzer"  
}  
}

In above mapping "title", "title.raw" and "title.stemmed" scores should not be added but max should be taken and

**Document score = Max(title, title.raw, title.stemmed) + description**

**AND NOT**

**Document score = title + title.raw + title.stemmed + description**

**Does ES provide a way to add the score of sub\_fields only once for the major field match?**

---

<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:** [May 23, 2018, 8:44pm UTC](https://discuss.elastic.co/t/tie-breaker-way-to-exclude-same-field-analyzed-using-different-analyzers-in-multi-field/129568/2 "2018-05-23T20:44:32Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
