<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>_Script on INFINI Pizza</title><link>https://pizza.rs/tags/_script/</link><description>Recent content in _Script on INFINI Pizza</description><generator>Hugo</generator><language>en</language><atom:link href="https://pizza.rs/tags/_script/index.xml" rel="self" type="application/rss+xml"/><item><title>Scripted queries</title><link>https://pizza.rs/docs/references/search/specialized/script-score/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pizza.rs/docs/references/search/specialized/script-score/</guid><description>&lt;h1 id="scripted-queries">
 Scripted queries
 &lt;a class="anchor" href="#scripted-queries">#&lt;/a>
&lt;/h1>
&lt;p>Scripts in the search request: &lt;code>script_score&lt;/code> to compute
the score, a &lt;code>script&lt;/code> predicate in a boolean filter, and a &lt;code>_script&lt;/code> sort
key. All run on Pizza&amp;rsquo;s sandboxed script engine (see

 &lt;a href="https://pizza.rs/docs/references/aggregation/pipeline/scripts/">the script language reference&lt;/a>) —
Rhai, not Painless, but the &lt;code>doc['x'].value&lt;/code>, &lt;code>_score&lt;/code>,
&lt;code>params.&amp;lt;name&amp;gt;&lt;/code> spellings run unmodified.&lt;/p>
&lt;h2 id="script_score--score-by-script">
 &lt;code>script_score&lt;/code> — score by script
 &lt;a class="anchor" href="#script_score--score-by-script">#&lt;/a>
&lt;/h2>
&lt;p>Wrap a query; the script&amp;rsquo;s value &lt;strong>replaces&lt;/strong> the score. The script sees
&lt;code>_score&lt;/code> (the wrapped query&amp;rsquo;s BM25 score), &lt;code>doc&lt;/code> (the hit&amp;rsquo;s &lt;code>_source&lt;/code> in
doc-values shape) and &lt;code>params&lt;/code>:&lt;/p></description></item></channel></rss>