# Newbie quesiton re: document size & score

**URL:** <https://discuss.elastic.co/t/newbie-quesiton-re-document-size-score/11673>\
**Category:** Elasticsearch\
**Created:** [April 23, 2013, 9:10pm UTC](https://discuss.elastic.co/t/newbie-quesiton-re-document-size-score/11673 "2013-04-23T21:10:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tieg\_Zaharia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tieg_zaharia/32/2375_2.png) [@Tieg\_Zaharia](https://discuss.elastic.co/u/Tieg_Zaharia)\
**Post date:** [April 23, 2013, 9:10pm UTC](https://discuss.elastic.co/t/newbie-quesiton-re-document-size-score/11673/1 "2013-04-23T21:10:10Z")

</div>

Hey all, I'm pretty new to ES still and have a scoring question:

Is there a way to disable/counteract Lucene's preference to score shorter  
documents higher?

For example, if I have:

- document A and B in an index
- I do a match query for term X
- doc A matches 1 time, and doc b matches 2 times
- however, in the ES results, A scores higher because it is slightly  
shorter than B (despite B having more matches).

I'm curious if there's a way to ignore document length so a document with  
more matches scores higher inevitably?

Thanks in advance.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [April 23, 2013, 9:32pm UTC](https://discuss.elastic.co/t/newbie-quesiton-re-document-size-score/11673/2 "2013-04-23T21:32:12Z")

</div>

there are multiple ways to do this, the simplest is to set "omit\_norm" :  
true in the mapping which will omit the normalization info for that field.  
see: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/core-types/)

simon

On Tuesday, April 23, 2013 11:10:10 PM UTC+2, Tieg Zaharia wrote:

> Hey all, I'm pretty new to ES still and have a scoring question:
> 
> Is there a way to disable/counteract Lucene's preference to score shorter  
> documents higher?
> 
> For example, if I have:
> 
> - document A and B in an index
> - I do a match query for term X
> - doc A matches 1 time, and doc b matches 2 times
> - however, in the ES results, A scores higher because it is slightly  
> shorter than B (despite B having more matches).
> 
> I'm curious if there's a way to ignore document length so a document with  
> more matches scores higher inevitably?
> 
> Thanks in advance.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tieg\_Zaharia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tieg_zaharia/32/2375_2.png) [@Tieg\_Zaharia](https://discuss.elastic.co/u/Tieg_Zaharia)\
**Post date:** [April 24, 2013, 4:20pm UTC](https://discuss.elastic.co/t/newbie-quesiton-re-document-size-score/11673/3 "2013-04-24T16:20:05Z")

</div>

omit\_norms is perfect! Thanks simonw.

On Tue, Apr 23, 2013 at 5:32 PM, simonw  
[simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)wrote:

> there are multiple ways to do this, the simplest is to set "omit\_norm" :  
> true in the mapping which will omit the normalization info for that field.  
> see: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/core-types/)
> 
> simon
> 
> On Tuesday, April 23, 2013 11:10:10 PM UTC+2, Tieg Zaharia wrote:
> 
> > Hey all, I'm pretty new to ES still and have a scoring question:
> > 
> > Is there a way to disable/counteract Lucene's preference to score shorter  
> > documents higher?
> > 
> > For example, if I have:
> > 
> > - document A and B in an index
> > - I do a match query for term X
> > - doc A matches 1 time, and doc b matches 2 times
> > - however, in the ES results, A scores higher because it is slightly  
> > shorter than B (despite B having more matches).
> > 
> > I'm curious if there's a way to ignore document length so a document with  
> > more matches scores higher inevitably?
> > 
> > Thanks in advance.
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/zHbRacGGYS8/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/zHbRacGGYS8/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:39am UTC](https://discuss.elastic.co/t/newbie-quesiton-re-document-size-score/11673/4 "2017-07-06T02:39:44Z")

</div>


