<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deduplication on INFINI Pizza</title><link>https://pizza.rs/tags/deduplication/</link><description>Recent content in Deduplication on INFINI Pizza</description><generator>Hugo</generator><language>en</language><atom:link href="https://pizza.rs/tags/deduplication/index.xml" rel="self" type="application/rss+xml"/><item><title>Field collapsing</title><link>https://pizza.rs/docs/references/search/request/collapse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pizza.rs/docs/references/search/request/collapse/</guid><description>&lt;h1 id="field-collapsing">
 Field collapsing
 &lt;a class="anchor" href="#field-collapsing">#&lt;/a>
&lt;/h1>
&lt;p>Collapse the result list so each distinct value of a field appears at most
once — &amp;ldquo;best product per merchant&amp;rdquo;, &amp;ldquo;best article per author&amp;rdquo; — without a
terms aggregation, keeping full hit semantics (scores, source, highlight).&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>Collapse is engine-native and runs as a post-retrieval step. The collector
normally stops at &lt;code>from + size&lt;/code>, but collapse pages over GROUPS, so the
engine first gathers a wider window — &lt;code>max(1000, from + size)&lt;/code> hits
(&lt;code>COLLAPSE_WINDOW&lt;/code> in &lt;code>lib/engine/src/search/mod.rs&lt;/code>) — in request sort
order, then:&lt;/p></description></item></channel></rss>