anchor.diff:  <3> a reference to a previously defined template
   <4> the parameters to use to fill the template
   
  -[float]
  -==== Available evaluation metrics
  -
  -The `metric` section determines which of the available evaluation metrics is going to be used.
  -Currently, the following metrics are supported:
  +
  +===== Available evaluation metrics
  +
  +The `metric` section determines which of the available evaluation metrics is 
  +going to be used. The following metrics are supported:
   
   [float]
   [[k-precision]]
   ===== Precision at K (P@k)
   
  -This metric measures the number of relevant results in the top k search results. Its a form of the well known https://en.wikipedia.org/wiki/Information_retrieval#Precision[Precision] metric that only looks at the top k documents. It is the fraction of relevant documents in those first k
  -search. A precision at 10 (P@10) value of 0.6 then means six out of the 10 top hits are relevant with respect to the users information need.
  -
  -P@k works well as a simple evaluation metric that has the benefit of being easy to understand and explain.
  -Documents in the collection need to be rated either as relevant or irrelevant with respect to the current query. 
  -P@k does not take into account where in the top k results the relevant documents occur, so a ranking of ten results that 
  -contains one relevant result in position 10 is equally good as a ranking of ten results that contains one relevant result in position 1.
  +This metric measures the number of relevant results in the top k search results. 
  +Its a form of the well known 
  +https://en.wikipedia.org/wiki/Information_retrieval#Precision[Precision] metric 
  +that only looks at the top k documents. It is the fraction of relevant documents 
  +in those first k search. A precision at 10 (P@10) value of 0.6 then means six 
  +out of the 10 top hits are relevant with respect to the users information need.
  +
  +P@k works well as a simple evaluation metric that has the benefit of being easy 
  +to understand and explain. Documents in the collection need to be rated either 
  +as relevant or irrelevant with respect to the current query. P@k does not take 
  +into account where in the top k results the relevant documents occur, so a 
  +ranking of ten results that contains one relevant result in position 10 is 
  +equally good as a ranking of ten results that contains one relevant result in 
  +position 1.
   
   [source,console]
   --------------------------------
  
positive.code: <2> definition of the evaluation metric to calculate
  <3> a specific metric and its parameters
  
  The request section contains several search requests typical to your application, along with the document ratings for each particular search request, e.g.
  
  [source,js]
  -----------------------------
      "requests": [
          {
              "id": "amsterdam_query", <1>
  
negative.code: 
  experimental["The ranking evaluation API is experimental and may be changed or removed completely in a future release, as well as change in non-backwards compatible ways on minor versions updates. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features."]
  
  Allows you to evaluate the quality of ranked search results over a set of 
  typical search queries.
  
  
  [[search-rank-eval-api-request]]
  ==== {api-request-title}
  
  `GET /<index>/_rank_eval`
  
  `POST /<index>/_rank_eval`
  
  
  [[search-rank-eval-api-desc]]
  ==== {api-description-title}
  
  The ranking evaluation API allows you to evaluate the quality of ranked search 
  results over a set of typical search queries. Given this set of queries and a
  list of manually rated documents, the `_rank_eval` endpoint calculates and
  returns typical information retrieval metrics like _mean reciprocal rank_,
  _precision_ or _discounted cumulative gain_.
  
  Search quality evaluation starts with looking at the users of your search 
  application, and the things that they are searching for. Users have a specific 
  _information need_, for example they are looking for gift in a web shop or want 
  to book a flight for their next holiday. They usually enter some search terms 
  into a search box or some other web form. All of this information, together with 
  meta information about the user (for example the browser, location, earlier 
  preferences and so on) then gets translated into a query to the underlying 
  search system.
  
  The challenge for search engineers is to tweak this translation process from 
  user entries to a concrete query in such a way, that the search results contain 
  the most relevant information with respect to the users information need. This 
  can only be done if the search result quality is evaluated constantly across a 
  representative test suite of typical user queries, so that improvements in the 
  rankings for one particular query doesn't negatively effect the ranking for 
  other types of queries.
  
  In order to get started with search quality evaluation, three basic things are 
  needed:
  
  . A collection of documents you want to evaluate your query performance against, 
    usually one or more indices.
  . A collection of typical search requests that users enter into your system.
  . A set of document ratings that judge the documents relevance with respect to a 
    search request.
    
  It is important to note that one set of document ratings is needed per test 
  query, and that the relevance judgements are based on the information need of 
  the user that entered the query.
  
  The ranking evaluation API provides a convenient way to use this information in 
  a ranking evaluation request to calculate different search evaluation metrics. 
  This gives a first estimation of your overall search quality and give you a 
  measurement to optimize against when fine-tuning various aspect of the query 
  generation in your application.
  
  
  [[search-rank-eval-api-path-params]]
  ==== {api-path-parms-title}
  
  `<index>`::
   (Required, string) Comma-separated list or wildcard expression of index names
   used to limit the request.
  
  [[search-rank-eval-api-query-params]]
  ==== {api-query-parms-title}
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  +
  --
  Defaults to `open`.
  --
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  
  
  [[search-rank-eval-api-example]]
  ==== {api-examples-title}
  
  In its most basic form, a request to the `_rank_eval` endpoint has two sections:
  
  