anchor.diff:  "relevant". Defaults to `1`.
   |=======================================================================
   
  +
   [float]
   ===== Discounted cumulative gain (DCG)
   
  -In contrast to the two metrics above, https://en.wikipedia.org/wiki/Discounted_cumulative_gain[discounted cumulative gain] takes both, the rank and the rating of the search results, into account.
  -
  -The assumption is that highly relevant documents are more useful for the user when appearing at the top of the result list. Therefore, the DCG formula reduces the contribution that high ratings for documents on lower search ranks have on the overall DCG metric.
  +In contrast to the two metrics above, 
  +https://en.wikipedia.org/wiki/Discounted_cumulative_gain[discounted cumulative gain] 
  +takes both, the rank and the rating of the search results, into account.
  +
  +The assumption is that highly relevant documents are more useful for the user 
  +when appearing at the top of the result list. Therefore, the DCG formula reduces 
  +the contribution that high ratings for documents on lower search ranks have on 
  +the overall DCG metric.
   
   [source,console]
   --------------------------------
  
positive.code: |`normalize` | If set to `true`, this metric will calculate the https://en.wikipedia.org/wiki/Discounted_cumulative_gain#Normalized_DCG[Normalized DCG].
  |=======================================================================
  
  [float]
  ===== Expected Reciprocal Rank (ERR)
  
  Expected Reciprocal Rank (ERR) is an extension of the classical reciprocal rank for the graded relevance case
  (Olivier Chapelle, Donald Metzler, Ya Zhang, and Pierre Grinspan. 2009. http://olivier.chapelle.cc/pub/err.pdf[Expected reciprocal rank for graded relevance].)
  
  It is based on the assumption of a cascade model of search, in which a user scans through ranked search
  results in order and stops at the first document that satisfies the information need. For this reason, it
  is a good metric for question answering and navigation queries, but less so for survey oriented information 
  needs where the user is interested in finding many relevant documents in the top k results.
  
  The metric models the expectation of the reciprocal of the position at which a user stops reading through
  the result list. This means that relevant document in top ranking positions will contribute much to the
  overall score. However, the same document will contribute much less to the score if it appears in a lower rank,
  even more so if there are some relevant (but maybe less relevant) documents preceding it. 
  In this way, the ERR metric discounts documents which are shown after very relevant documents. This introduces 
  a notion of dependency in the ordering of relevant documents that e.g. Precision or DCG don't account for.
  
  [source,console]
  --------------------------------
  
negative.code:             ]
          }
      ]
    }
  -----------------------------
  // NOTCONSOLE
  
  <1> the search requests id, used to group result details later 
  <2> the query that is being evaluated
  <3> a list of document ratings, each entry containing the documents `_index` and 
  `_id` together with the rating of the documents relevance with regards to this 
  search request
  
  A document `rating` can be any integer value that expresses the relevance of the 
  document on a user defined scale. For some of the metrics, just giving a binary 
  rating (for example `0` for irrelevant and `1` for relevant) will be sufficient, 
  other metrics can use a more fine grained scale.
  
  
  ===== Template based ranking evaluation
  
  As an alternative to having to provide a single query per test request, it is 
  possible to specify query templates in the evaluation request and later refer to 
  them. Queries with similar structure that only differ in their parameters don't 
  have to be repeated all the time in the `requests` section this way. In typical 
  search systems where user inputs usually get filled into a small set of query 
  templates, this helps making the evaluation request more succinct.
  
  [source,js]
  --------------------------------
  