# Weighted zone scoring

**URL:** <https://discuss.elastic.co/t/weighted-zone-scoring/19939>\
**Category:** Elasticsearch\
**Created:** [September 24, 2014, 11:05am UTC](https://discuss.elastic.co/t/weighted-zone-scoring/19939 "2014-09-24T11:05:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dysteleology](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Dysteleology](https://discuss.elastic.co/u/Dysteleology)\
**Post date:** [September 24, 2014, 11:05am UTC](https://discuss.elastic.co/t/weighted-zone-scoring/19939/1 "2014-09-24T11:05:13Z")

</div>

I am currently using a filtered query combined with a query string filter  
to do my searches within ElasticSearch. Although I am aware of the  
drawbacks I would like to present the user with a percentage as a scoring.  
To do this I would like to make use of Weighted zone scoring / Ranked  
Boolean retrieval. I tried searching on Google and this group but I cannot  
find any examples on how to implement this. Could anyone explain to me how  
to use this type of scoring?

--  
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/a10540f2-4388-4e74-8204-b26aff621230%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a10540f2-4388-4e74-8204-b26aff621230%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Dysteleology](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Dysteleology](https://discuss.elastic.co/u/Dysteleology)\
**Post date:** [September 25, 2014, 3:32pm UTC](https://discuss.elastic.co/t/weighted-zone-scoring/19939/2 "2014-09-25T15:32:23Z")

</div>

To provide an example of what I try to do (example from Introdcution to  
Information Retrieval):

“Consider the query shakespeare in a collection in which each document has  
three zones: _author, title_ and _body_. The Boolean score function for a  
zone takes on the value 1 if the query term shakespeare is present in the  
zone, and zero otherwise. Weighted zone scoring in such a collection would  
require three weights g1, g2 and g3, respectively corresponding to the _author,  
title_ and _body_ zones. Suppose we set g1 = 0,2, g2=0,3 and g3 = o,5 (so  
that the three weights add up to 1); this corresponds to an application in  
which a match in the _author_ zone is least important to the overall score,  
the _title_ zone somewhat more, and the _body_ contributes even more.

Thus if the term shakespeare were to appear in the _title_ and _body_ zones  
but not the _author_ zone of a document, the score of this document would  
be 0.8.”

The list of fields that are searched within a document can be dynamic.

On Wednesday, September 24, 2014 1:05:13 PM UTC+2, Dysteleology wrote:

> I am currently using a filtered query combined with a query string filter  
> to do my searches within Elasticsearch. Although I am aware of the  
> drawbacks I would like to present the user with a percentage as a scoring.  
> To do this I would like to make use of Weighted zone scoring / Ranked  
> Boolean retrieval. I tried searching on Google and this group but I cannot  
> find any examples on how to implement this. Could anyone explain to me how  
> to use this type of scoring?

--  
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/69ade797-a54d-49f3-a40d-ca6d3c2aefdd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/69ade797-a54d-49f3-a40d-ca6d3c2aefdd%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:59am UTC](https://discuss.elastic.co/t/weighted-zone-scoring/19939/3 "2017-07-06T00:59:56Z")

</div>


