How does the "from" parameter work in a rescore query?

I want to do paging in a query with "rescore", but I don't understand the behavior of the "from" parameter.

I would like to process the following in this order.

  1. Keyword search
  2. Sort the top 100 results using embedding
  3. Sort the top 30 results using the user's profile

query example:

  {
    query: {
      bool: {
        should: [
          {
            match: {
              body1: {
                query: (input keyword)
              }
            }
          },
          {
            match: {
              body2: {
                query: (input keyword)
              }
            }
          }
        ],
        filter: filters,
        minimum_should_match: 1
      }
    },
    rescore: [
      {
        window_size: 100,
        query: {
          rescore_query: {
            function_score: {
              query: {
                match_all: {}
              },
              functions: [
                {
                  script_score: {
                    script: {
                      source: 'Math.max(cosineSimilarity(params.queryVector, "additional_details_vector"), 0.01)',
                      params: {
                        queryVector: (input embedding)
                      }
                    }
                  }
                }
              ]
            }
          },
          score_mode: "multiply"
        }
      },
      {
        window_size: 30,
        query: {
          score_mode: "multiply",
          rescore_query: {
            function_score: {
              functions: [
                {
                  linear: {
                    user_age_rank: {
                      origin: (input user_age_rank),
                      scale: 2,
                      offset: 0,
                      decay: 0.5
                    }
                  },
                  weight: 3
                },
                ...
              ],
              score_mode: "sum"
            }
          }
        }
      }
    ],
    size: 10,
    from: (input page - 1) * 10,
  }

When I run the above query, for some reason, profile scoring stops on the 9th page (not the 4th page).
It seems that the embedding score is also added after page 20.

Why does this happen?
Is there any documentation about the behavior of the “from” parameter in rescore queries?

I've solved it myself.

I forgot to write it.
The number of shards is 3.

Since window_size is applied to each shard, if the window_size is 30 and the number of shards is 3, it seems that scoring based on user_profile is applied to 90 cases, and they all come out on top.