# Wrong examples in the rank feature query documentation

**URL:** <https://discuss.elastic.co/t/wrong-examples-in-the-rank-feature-query-documentation/278956>\
**Category:** Elasticsearch\
**Created:** [July 17, 2021, 4:52am UTC](https://discuss.elastic.co/t/wrong-examples-in-the-rank-feature-query-documentation/278956 "2021-07-17T04:52:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rueian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rueian/32/5361_2.png) [@rueian](https://discuss.elastic.co/u/rueian)\
**Post date:** [July 17, 2021, 4:52am UTC](https://discuss.elastic.co/t/wrong-examples-in-the-rank-feature-query-documentation/278956/1 "2021-07-17T04:52:01Z")

</div>

Hi, I noticed that the [rank feature query documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.14/query-dsl-rank-feature-query.html) contains the following examples:

```auto
PUT /test/_doc/2?refresh
{
  ....
  "topics": {
    "sports": 35,
    "formula one": 65,
    "brazil": 20
  }
}

PUT /test/_doc/3?refresh
{
  ...
  "topics": {
    "movies": 60,
    "super hero": 65
  }
}

```

and the documentation states that users can boost the relevance scores by:

```auto
GET /test/_search
{
  "query": {
    "bool": {
      ...
      "should": [
        ...
        {
          "rank_feature": {
            "field": "topics.sports",
            "boost": 0.4
          }
        }
      ]
    }
  }
}

```

However, the documentation doesn't say that users can't boost scores by other multi term fields like `"field": "topics.super hero"` or `"field": "topics.formula one"`

I think it is better having some notices in the documentation about that not any arbitrary field name is supported by the rank\_feature query.

---

<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:** [August 14, 2021, 4:52am UTC](https://discuss.elastic.co/t/wrong-examples-in-the-rank-feature-query-documentation/278956/2 "2021-08-14T04:52:52Z")

</div>

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