<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Search - Tag - Saksham Arora</title>
        <link>https://sakshamarora.dev/tags/search/</link>
        <description>Search - Tag - Saksham Arora</description>
        <generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 31 Dec 2024 18:00:00 &#43;0100</lastBuildDate><atom:link href="https://sakshamarora.dev/tags/search/" rel="self" type="application/rss+xml" /><item>
    <title>How Mappings and Query Design Make or Break Search</title>
    <link>https://sakshamarora.dev/2024/12/searchrelevanceandperformance/</link>
    <pubDate>Tue, 31 Dec 2024 18:00:00 &#43;0100</pubDate>
    <author></author>
    <guid>https://sakshamarora.dev/2024/12/searchrelevanceandperformance/</guid>
    <description><![CDATA[<div class="featured-image">
                <img src="/images/search-relevance-pipeline.png" referrerpolicy="no-referrer">
            </div><p>Search quality depends on what is indexed, how text and fields are mapped, how queries filter and score results, and how indices evolve. A system can be fast but irrelevant, accurate but slow, or apparently correct while silently missing documents. Most failures come from layers that no longer agree.</p>
<h2 id="search-begins-before-the-query">Search begins before the query</h2>
<p>Before tuning scoring, verify that the indexed document contains the expected fields:</p>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-text">
        <span class="code-title"><i class="arrow fas fa-angle-right" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h" aria-hidden="true"></i></span>
        <span class="copy" title="Copy to clipboard"><i class="far fa-copy" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Database record
</span></span><span class="line"><span class="cl">  -&gt; application serializer
</span></span><span class="line"><span class="cl">  -&gt; search document
</span></span><span class="line"><span class="cl">  -&gt; index mapping and analyzer
</span></span><span class="line"><span class="cl">  -&gt; query parser
</span></span><span class="line"><span class="cl">  -&gt; OpenSearch or Elasticsearch</span></span></code></pre></div></div>
<p>A database field may still be unsearchable because the serializer omitted it, used another path, or produced a document the mapping rejected. The query may ignore it, or an application filter may hide the document. UI tests do not distinguish these failures. Compare the database representation, generated search document, mapping, and final query before changing relevance settings.</p>]]></description>
</item>
</channel>
</rss>
