<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pagination on INFINI Pizza</title><link>https://pizza.rs/tags/pagination/</link><description>Recent content in Pagination on INFINI Pizza</description><generator>Hugo</generator><language>en</language><atom:link href="https://pizza.rs/tags/pagination/index.xml" rel="self" type="application/rss+xml"/><item><title>Sort and pagination</title><link>https://pizza.rs/docs/references/search/request/sort/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pizza.rs/docs/references/search/request/sort/</guid><description>&lt;h1 id="sort-and-pagination">
 Sort and pagination
 &lt;a class="anchor" href="#sort-and-pagination">#&lt;/a>
&lt;/h1>
&lt;p>Control which documents come back and in what order — &lt;code>sort&lt;/code>, &lt;code>from&lt;/code>/&lt;code>size&lt;/code>,
&lt;code>search_after&lt;/code>/&lt;code>search_before&lt;/code>, and total-hit accounting.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-sh" data-lang="sh">&lt;span class="line">&lt;span class="cl">POST /my-collection/_search
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="how-it-works">
 How it works
 &lt;a class="anchor" href="#how-it-works">#&lt;/a>
&lt;/h2>
&lt;p>&lt;code>sort&lt;/code> is an array of sort clauses evaluated in order; the first clause
that produces a difference decides the order. Sorting on an indexed field
lets the collector skip documents that cannot make the cut (early
termination), so field sorts — and &lt;code>_doc&lt;/code> above all — are cheaper than
score sorts, not just differently ordered.&lt;/p></description></item></channel></rss>