# Customise score based on Search Results Pagination

**URL:** <https://discuss.elastic.co/t/customise-score-based-on-search-results-pagination/265915>\
**Category:** Elasticsearch\
**Created:** [March 2, 2021, 7:38am UTC](https://discuss.elastic.co/t/customise-score-based-on-search-results-pagination/265915 "2021-03-02T07:38:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkata\_Naresh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkata_naresh/32/51355_2.png) [@Venkata\_Naresh](https://discuss.elastic.co/u/Venkata_Naresh)\
**Post date:** [March 2, 2021, 7:38am UTC](https://discuss.elastic.co/t/customise-score-based-on-search-results-pagination/265915/1 "2021-03-02T07:38:30Z")

</div>

Hi Team,

I have some documents in ES and I want results in pagination and for that I'm using From/Offset. But lets suppose I want 5 documents in every page and in each page I want some documents should be at the bottom of respective page irrespective of document score.

Can someone guide me an approach to solve this problem.

**1st Page Response:** In this I want document 4 and 5 should be at the bottom and lets assume I change the document scores to 0

```auto
      "docs": [
        {
          "_id": 1,
          "name": "jack",
          "score": 40
        },
        {
          "_id": 2,
          "name": "ryan",
          "score": 30
        },
        {
          "_id": 3,
          "name": "mark",
          "score": 20
        },
        {
          "_id": 4,
          "name": "taylor",
          "score": 0
        },
        {
          "_id": 5,
          "name": "taylor",
          "score": 0
        }
      ]
    }

```

**2nd Page Response:** In this I want document 9 and 10 should be at the bottom

```auto
      "docs": [
        {
          "_id": 6,
          "name": "jack",
          "score": 22
        },
        {
          "_id": 7,
          "name": "ryan",
          "score": 20
        },
        {
          "_id": 8,
          "name": "mark",
          "score": 15
        },
        {
          "_id": 9,
          "name": "taylor",
          "score": 0
        },
        {
          "_id": 10,
          "name": "taylor",
          "score": 0
        }
      ]
    }

```

Can some one please help me to solve this issue

Thanks & Regards

---

<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:** [March 30, 2021, 7:38am UTC](https://discuss.elastic.co/t/customise-score-based-on-search-results-pagination/265915/2 "2021-03-30T07:38:43Z")

</div>

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