PageSourceSearch

https://www.searchkit.co/_next/static/chunks/pages/docs/guides/learn-to-rank-e1974867e8dec5ce.js

js searchkit.co collected 2026-10-03 20:29:49 UTC 61,472 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1237],{7009:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/guides/learn-to-rank",function(){return t(2025)}])},2025:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return l}});var r=t(5893),n=t(2673),i=t(992),o=t(2626);t(9128);var a=t(2643);let l=[{depth:2,value:"Changes to Searchkit UI",id:"changes-to-searchkit-ui"},{depth:2,value:"Changes to the Searchkit API",id:"changes-to-the-searchkit-api"}];function _createMdxContent(e){let s=Object.assign({h1:"h1",p:"p",a:"a",ul:"ul",li:"li",h2:"h2",code:"code",pre:"pre",span:"span"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Learn to Rank"}),"\n",(0,r.jsx)(s.p,{children:"Learn to Rank is a machine learning technique that allows you to train a model to rank search results. The model is trained using a set of features and a set of relevance judgements. The model is then used to rank search results."}),"\n",(0,r.jsxs)(s.p,{children:["In this guide, you will learn how to integrate Learn to Rank with Metarank and Searchkit. You can learn more about Learn to Rank with Metarank in the ",(0,r.jsx)(s.a,{href:"https://metarank.io/docs/learn-to-rank",children:"Metarank documentation"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"We assume in this guide that you have:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Installed Metarank and Searchkit"}),"\n",(0,r.jsx)(s.li,{children:"Trained a model using Metarank"}),"\n",(0,r.jsx)(s.li,{children:"Setup the features and relevance judgements for your model"}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"changes-to-searchkit-ui",children:"Changes to Searchkit UI"}),"\n",(0,r.jsxs)(s.p,{children:["Metarank requires session id and user id to be sent with each search request. One way to do this is in the ",(0,r.jsx)(s.code,{children:"@searchkit/instantsearch-client"})," and provide the session id and user id via headers:"]}),"\n",(0,r.jsx)(s.pre,{"data-language":"js","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"js","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"searchClient"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  url"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"/api/search"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  headers"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"x-session-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"my-session-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"x-user-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"my-user-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"});"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"changes-to-the-searchkit-api",children:"Changes to the Searchkit API"}),"\n",(0,r.jsxs)(s.p,{children:["To integrate Learn to Rank with Searchkit, we will use the hooks for ",(0,r.jsx)(s.code,{children:"beforeSearch"})," and ",(0,r.jsx)(s.code,{children:"afterSearch"}),". These hooks allow us to modify the query and the results before they are sent to Elasticsearch and returned to the UI."]}),"\n",(0,r.jsxs)(s.p,{children:["We will use the ",(0,r.jsx)(s.code,{children:"afterSearch"})," hook to send the results to the Metarank API and update the results with the new order."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"ts","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"ts","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"default"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"function"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"handler"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(req"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"NextApiRequest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" res"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"NextApiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:") {"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"headers"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"req"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".headers"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"results"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"client"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".handleRequest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"req"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    hooks"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"afterSearch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"async"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (searchRequests"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" searchResponses) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the first search request"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uiRequest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"otherRequests"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" searchRequests;"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the first search response"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"otherResponses"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" searchResponses;"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the session id and user id from the headers"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"sessionId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" headers["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"x-session-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"userId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" headers["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"x-user-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"];"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the query from the first search request"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"query"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uiRequest"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".query;"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the results from the first search response"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-
1keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"results"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"hits"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".hits;"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Send the request to the Metarank API"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"fetch"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"http://localhost:8080/rank/xgboost"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          method"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"POST"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          headers"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Content-Type"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"application/json"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"JSON"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".stringify"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"({"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            session"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" sessionId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            user"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" userId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            fields"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" [ "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"              { name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"query"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" query }"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            ]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            timestamp"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"new"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"Date"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"}
1,children:"())"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".getTime"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"()"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            items"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"results"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((item) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"              "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"._id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// an optional array of extra fields that you can use in your model"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                fields"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                  { name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"title"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"_source"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".title }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                  { name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"description"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"_source"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".description }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                  { name"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"url"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" value"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"_source"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".url }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"                ]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"              };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            }})"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          })"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        });"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the response from the Metarank API"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"metarankResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"await"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"response"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".json"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"}
1,children:"();"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Get the items order from the response"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"items"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"metarankResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".items;"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Update the order of the results for the first 20 results"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"updatedResults"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"items"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".map"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((item) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"results"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".find"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((result) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"result"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"._id "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"==="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"item"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".id);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" result"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        });"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// Update the results in the first search response"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"updatedUiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"uiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            hits"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"              "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"uiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".hits"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"              hits"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" updatedResults"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"            }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          updatedUiResponse"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"          "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"..."}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"otherResponses"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"        ];"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"      }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"    }"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"  });"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})})]})})]})}let c={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(_createMdxContent,{...e})}):_createMdxContent(e)},pageOpts:{filePath:"pages/docs/guides/learn-to-rank.mdx",route:"/docs/guides/learn-to-rank",frontMatter:{title:"Learn to Rank",description:"Integrate Learn to Rank with Metarank"},pageMap:[{kind:"MdxPage",name:"404",route:"/404"},{kind:"Meta",data:{404:"404","*":{type:"page"},index:{display:"hidden",title:"Home",type:"page",theme:{sidebar:!1,toc:!0,layout:"raw"}},docs:{title:"Docs",type:"page"},demos:{title:"Demos",type:"page"}
1,hidden:{display:"hidden"},about:{title:"About",type:"page"}}},{kind:"MdxPage",name:"about",route:"/about",frontMatter:{title:"About Searchkit"}},{kind:"MdxPage",name:"demos",route:"/demos"},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{overview:"Overview","getting-started":{title:"Quick Start"},components:{title:"Components"},"proxy-elasticsearch":{title:"Proxy Elasticsearch"},"query-rules":"Query Rules","api-documentation":{title:"API Documentation"},tutorials:{title:"Tutorials"},guides:"Guides"}},{kind:"Folder",name:"api-documentation",route:"/docs/api-documentation",children:[{kind:"Meta",data:{searchkit:"Searchkit API",api:"Node API","instantsearch-client":"Instantsearch Client API"}},{kind:"MdxPage",name:"api",route:"/docs/api-documentation/api",frontMatter:{title:"Node API",description:"Searchkit Node API for Elasticsearch",keywords:["searchkit","tutorial","walkthrough","elasticsearch","react","javascript","typescript","search","search ui","search experience","site search","app search"]}},{kind:"MdxPage",name:"instantsearch-client",route:"/docs/api-documentation/instantsearch-client",frontMatter:{title:"Browser Client",description:"Instanstsearch client for React Instantsearch"}},{kind:"MdxPage",name:"searchkit",route:"/docs/api-documentation/searchkit",frontMatter:{title:"Searchkit API",description:"Searchkit Node API for Elasticsearch"}}]},{kind:"Folder",name:"components",route:"/docs/components",children:[{kind:"Meta",data:{"search-box":"Search Box",autocomplete:"Autocomplete",results:"Results",refinements:"Refinement Facets","query-rules":"Query Rules","geo-search":"Geo Search","sort-by":"Sort By",pagination:"Pagination"}},{kind:"MdxPage",name:"autocomplete",route:"/docs/components/autocomplete",frontMatter:{title:"Autocomplete",description:"How to use Algolia autocomplete.js with Searchkit"}},{kind:"Folder",name:"geo-search",route:"/docs/components/geo-search",children:[{kind:"MdxPage",name:"geo-search",route:"/docs/components/geo-search/geo-search",frontMatter:{title:"Geo Search"}},{kind:"Meta",data:{"geo-search":"Geo Search"}}]},{kind:"MdxPage",name:"pagination",route:"/docs/components/pagination",frontMatter:{title:"Pagination"}},{kind:"Folder",name:"query-rules",route:"/docs/components/query-rules",children:[{kind:"MdxPage",name:"query-rule-context",route:"/docs/components/query-rules/query-rule-context",frontMatter:{title:"Query Rule Context"}},{kind:"MdxPage",name:"query-rule-custom-data",route:"/docs/components/query-rules/query-rule-custom-data",frontMatter:{title:"Query Rule Custom Data"}},{kind:"Meta",data:{"query-rule-context":"Query Rule Context","query-rule-custom-data":"Query Rule Custom Data"}}]},{kind:"Folder",name:"refinements",route:"/docs/components/refinements",children:[{kind:"Meta",data:{"refinement-list":"Refinement List","hierarchical-menu":"Hierarchical Menu","numeric-menu":"Numeric Menu","range-slider":"Range Slider","range-input":"Range Input","rating-menu":"Rating Menu",menu:"Menu","menu-select":"Menu Select","toggle-refinement":"Toggle Refinement","current-refinements":"Current Refinements","clear-refinements":"Clear Refinements",DynamicWidgets:"Dynamic Widgets","add-custom-refinement":"Add Custom Refinement","dynamic-widgets":"Dynamic Widgets"}},{kind:"MdxPage",name:"add-custom-refinement",route:"/docs/components/refinements/add-custom-refinement",frontMatter:{title:"Add Custom Refinement"}},{kind:"MdxPage",name:"clear-refinements",route:"/docs/components/refinements/clear-refinements",frontMatter:{title:"Clear Refinements"}},{kind:"MdxPage",name:"current-refinements",route:"/docs/components/refinements/current-refinements",frontMatter:{title:"Current Refinements"}},{kind:"MdxPage",name:"dynamic-widgets",route:"/docs/components/refinements/dynamic-widgets",frontMatter:{title:"Dynamic Widgets"}},{kind:"MdxPage",name:"hierarchical-menu",route:"/docs/components/refinements/hierarchical-menu",frontMatter:{title:"Hierarchical Menu"}},{kind:"MdxPage",name:"menu-select",route:"/docs/components/refinements/menu-select",frontMatter:{title:"Menu Select"}},{kind:"MdxPage",name:"menu",route:"/docs/components/refinements/menu",frontMatter:{title:"Menu"}},{kind:"MdxPage",name:"numeric-menu",route:"/docs/components/refinements/numeric-menu",frontMatter:{title:"Numeric Menu"}},{kind:"MdxPage",name:"range-input",route:"/docs/components/refinements/range-input",frontMatter:{title:"Range Input"}},{kind:"MdxPage",name:"range-slider",route:"/docs/components/refinements/range-slider",frontMatter:{title:"Range Slider"}},{kind:"MdxPage",name:"rating-menu",route:"/docs/components/refinements/rating-menu",frontMatter:{title:"Rating Menu"}},{kind:"MdxPage",name:"refinement-list",route:"/docs/components/refinements/refinement-list",frontMatter:{title:"Refinement List"}},{kind:"MdxPage",name:"toggle-refinement",route:"/docs/components/refinements/toggle-refinement",frontMatter:{title:"Toggle Refinement"}}]},{kind:"Folder",name:"results",route:"/docs/components/results",children:[{kind:"Meta",data:{hits:"Hits","infinite-hits":"Infinite Hits",highlight:"Highlight",snippet:"Snippet"}},{kind:"MdxPage",name:"highlight",route:"/docs/components/results/highlight",frontMatter:{title:"Highlight"}},{kind:"MdxPage",name:"hits",route:"/docs/components/results/hits",frontMatter:{title:"Hits"}},{kind:"MdxPage",name:"infinite-hits",route:"/docs/components/results/infinite-hits",frontMatter:{title:"Infinite Hits"}},{kind:"MdxPage",name:"snippet",route:"/docs/components/results/snippet",frontMatter:{title:"Snippet"}}]},{kind:"MdxPage",name:"search-box",route:"/docs/components/search-box",frontMatter:{title:"Search Box"}},{kind:"MdxPage",name:"sort-by",route:"/docs/components/sort-by",frontMatter:{title:"Sort By"}}]},{kind:"Folder",name:"getting-started",route:"/docs/getting-started",children:[{kind:"Meta",data:{"with-javascript":{title:"With JS Widgets"},"with-react":{title:"With React"},"with-vue":{title:"With Vue"},"with-angular":{title:"With Angular"},setup:{display:"hidden",title:"Quick Start with Searchkit"}}},{kind:"MdxPage",name:"setup",route:"/docs/getting-started/setup",frontMatter:{title:"Quick Start with Searchkit"}},{kind:"MdxPage",name:"with-angular",route:"/docs/getting-started/with-angular",frontMatter:{title:"With Angular"}},{kind:"MdxPage",name:"with-javascript",route:"/docs/getting-started/with-javascript",frontMatter:{title:"Quick Start with Searchkit",description:"This guide will show you how to get started with Searchkit and instantsearch.js.",keywords:"searchkit, instantsearch, search, javascript, jquery"}},{kind:"MdxPage",name:"with-react",route:"/docs/getting-started/with-react",frontMatter:{title:"With React",description:"Tutorial for getting started with Searchkit and React Instantsearch",keywords:"searchkit, react, instantsearch, tutorial, quickstart, getting started, Elasticsearch, Opensearch"}},{kind:"MdxPage",name:"with-vue",route:"/docs/getting-started/with-vue",frontMatter:{title:"With Vue",description:"How to build Search UI with Vue and Elasticsearch Quick Start",keywords:"vue, elasticsearch, search, search ui, searchkit, searchkit quick start"}}]},{kind:"Folder",name:"guides",route:"/docs/guides",children:[{kind:"Meta",data:{"setup-elasticsearch":"Setup Elasticsearch","enable-cors":"Enable CORS","indexing-data":"Indexing Data","customising-query":"Search Relevance",facets:"Facets",filters:"Filters","user-restricted-data":"User-restricted access to data","learn-to-rank":"Learn to Rank","migrating-algolia-to-elasticsearch":"Migrating from Algolia to Elasticsearch"}},{kind:"MdxPage",name:"customising-query",route:"/docs/guides/customising-query",frontMatter:{title:"Search Relevance",description:"How to customise the default query for customised relevance"}},{kind:"MdxPage",name:"enable-cors",route:"/docs/guides/enable-cors",frontMatter:{title:"Add CORS headers",description:"Add CORS headers to Elasticsearch / Opensearch to allow calling directly from the browser"}},{kind:"Folder",name:"facets",route:"/docs/guides/facets",children:[{kind:"Meta",data:{"string-based-facets":"String Facets","numeric-based-facets":"Numeric Facets"}},{kind:"MdxPage",name:"numeric-based-facets",route:"/docs/guides/facets/numeric-based-facets",frontMatter:{title:"Numeric based",description:"Searchkit supports a number of different instantsearch facet components. The following examples show what components are supported and how to add them to your search application.",keywords:"searchkit, search, faceting"}},{kind:"MdxPage",name:"string-based-facets",route:"/docs/guides/facets/string-based-facets",frontMatter:{title:"Str
1ing based",description:"Searchkit supports string based facet attributes. This page shows how to define a facet attribute and how to use it with instantsearch components.",keywords:"searchkit, elasticsearch, instantsearch, facet, attribute, string"}}]},{kind:"Folder",name:"filters",route:"/docs/guides/filters",children:[{kind:"Meta",data:{"filter-by-string":"Filter By String value","filter-by-array":"Filter By Array value","filter-by-numeric-value":"Filter By Numeric value","filter-by-boolean":"Filter By Boolean value","filter-by-date":"Filter By Date value"}},{kind:"MdxPage",name:"filter-by-array",route:"/docs/guides/filters/filter-by-array",frontMatter:{title:"Filtering of Arrays",description:"Learn how to filter your search results by array of string values.",keywords:"search, filter, array, string, values"}},{kind:"MdxPage",name:"filter-by-boolean",route:"/docs/guides/filters/filter-by-boolean",frontMatter:{title:"Filter by boolean value",description:"Filter your search results by boolean value",keywords:"filter, boolean, value, in stock, out of stock"}},{kind:"MdxPage",name:"filter-by-date",route:"/docs/guides/filters/filter-by-date",frontMatter:{title:"Filtering by Date",description:"Learn how to filter your search results by date.",keywords:"date, filter, date filtering"}},{kind:"MdxPage",name:"filter-by-numeric-value",route:"/docs/guides/filters/filter-by-numeric-value",frontMatter:{title:"Filter by numeric value"}},{kind:"MdxPage",name:"filter-by-string",route:"/docs/guides/filters/filter-by-string",frontMatter:{title:"Filtering by String"}}]},{kind:"MdxPage",name:"filters",route:"/docs/guides/filters",frontMatter:{title:"Filters",description:"Learn how to apply filters to your search results."}},{kind:"MdxPage",name:"indexing-data",route:"/docs/guides/indexing-data",frontMatter:{title:"Indexing data",description:"Indexing data into Elasticsearch for use with Instantsearch and Searchkit"}},{kind:"MdxPage",name:"learn-to-rank",route:"/docs/guides/learn-to-rank",frontMatter:{title:"Learn to Rank",description:"Integrate Learn to Rank with Metarank"}},{kind:"MdxPage",name:"migrating-algolia-to-elasticsearch",route:"/docs/guides/migrating-algolia-to-elasticsearch",frontMatter:{title:"Migrating from Algolia to Elasticsearch with Searchkit",description:"Use Searchkit to migrate from Algolia to Elasticsearch"}},{kind:"MdxPage",name:"setup-elasticsearch",route:"/docs/guides/setup-elasticsearch",frontMatter:{title:"Connecting to Elasticsearch",description:"How to connect to Elasticsearch with Searchkit"}},{kind:"MdxPage",name:"user-restricted-data",route:"/docs/guides/user-restricted-data",frontMatter:{title:"User-restricted access to data",description:"Learn how to restrict access to data based on the user's role"}}]},{kind:"MdxPage",name:"overview",route:"/docs/overview"},{kind:"Folder",name:"proxy-elasticsearch",route:"/docs/proxy-elasticsearch",children:[{kind:"Meta",data:{why:"Why Proxy Elasticsearch?","with-next-js":"With Next.js","with-express-js":"With Express.js","with-cloudflare-workers":"With Cloudflare Workers","with-your-own-server":"With your own API server"}},{kind:"MdxPage",name:"why",route:"/docs/proxy-elasticsearch/why",frontMatter:{title:"Why Proxy Elasticsearch?",description:"Explains why you should proxy Elasticsearch from the web and how to do it with Searchkit."}},{kind:"MdxPage",name:"with-cloudflare-workers",route:"/docs/proxy-elasticsearch/with-cloudflare-workers",frontMatter:{title:"With cloudflare workers",description:"Use cloudflare workers to proxy search requests to Elasticsearch"}},{kind:"MdxPage",name:"with-express-js",route:"/docs/proxy-elasticsearch/with-express-js",frontMatter:{title:"With cloudflare workers",description:"Use cloudflare workers to proxy search requests to Elasticsearch"}},{kind:"MdxPage",name:"with-next-js",route:"/docs/proxy-elasticsearch/with-next-js",frontMatter:{title:"With Next.js",description:"Use Next.js Functions to proxy search requests to Elasticsearch"}},{kind:"MdxPage",name:"with-your-own-server",route:"/docs/proxy-elasticsearch/with-your-own-server",frontMatter:{title:"With your own API Server",description:"Proxy 
1Elasticsearch requests through your own application server"}}]},{kind:"Folder",name:"query-rules",route:"/docs/query-rules",children:[{kind:"Meta",data:{conditions:"Conditions",actions:"Actions"}},{kind:"Folder",name:"actions",route:"/docs/query-rules/actions",children:[{kind:"MdxPage",name:"facet-order",route:"/docs/query-rules/actions/facet-order",frontMatter:{title:"Facets Order",description:"Learn how to use the RenderUserData action to send data to the frontend to perform a number of actions."}},{kind:"MdxPage",name:"pin-result",route:"/docs/query-rules/actions/pin-result",frontMatter:{title:"Pin Result",description:"Apply a pin result action rule"}},{kind:"MdxPage",name:"query-boost",route:"/docs/query-rules/actions/query-boost",frontMatter:{title:"Query Boost",description:"Learn how to boost the relevance of your search results."}},{kind:"MdxPage",name:"query-filter",route:"/docs/query-rules/actions/query-filter",frontMatter:{title:"Query Filter",description:"Learn how to filter documents from your search results."}},{kind:"MdxPage",name:"query-rewrite",route:"/docs/query-rules/actions/query-rewrite"},{kind:"MdxPage",name:"render-user-data",route:"/docs/query-rules/actions/render-user-data",frontMatter:{title:"Render Data",description:"Learn how to use the RenderUserData action to send data to the frontend to perform a number of actions."}},{kind:"Meta",data:{"facet-order":"Facets Order","pin-result":"Pin Result","query-boost":"Query Boost","query-filter":"Query Filter","query-rewrite":"Query Rewrite","render-user-data":"Render Data"}}]},{kind:"Folder",name:"conditions",route:"/docs/query-rules/conditions",children:[{kind:"MdxPage",name:"context",route:"/docs/query-rules/conditions/context",frontMatter:{title:"Context",description:"Apply a context condition rule"}},{kind:"MdxPage",name:"filters",route:"/docs/query-rules/conditions/filters",frontMatter:{title:"Filter",description:"Apply a Filter Present condition rule"}},{kind:"MdxPage",name:"query-text",route:"/docs/query-rules/conditions/query-text",frontMatter:{title:"Query Text",description:"Apply a query condition rule"}},{kind:"Meta",data:{context:"Context",filters:"Filter","query-text":"Query Text"}}]}]},{kind:"MdxPage",name:"query-rules",route:"/docs/query-rules",frontMatter:{title:"Query Rules",description:"Query rules are a powerful feature that allows you to customize the behavior of the search experience."}},{kind:"Folder",name:"tutorials",route:"/docs/tutorials",children:[{kind:"Meta",data:{"with-nextjs":"Build a Next.js App","build-availability-search-ui":"Availability Search UI","semantic-search":"Semantic Search"}},{kind:"MdxPage",name:"build-availability-search-ui",route:"/docs/tutorials/build-availability-search-ui",frontMatter:{title:"How to build an availability search UI with Elasticsearch",description:"In this example we are imagining a booking site for cabins.",keywords:["nextjs","searchkit","tutorial","walkthrough","elasticsearch","react","javascript","typescript","search","search ui","search experience","site search","app search"]}},{kind:"MdxPage",name:"semantic-search",route:"/docs/tutorials/semantic-search",frontMatter:{title:"Semantic Search",description:"Learn how to build a semantic search experience with Searchkit and Next.js",keywords:["nextjs","searchkit","tutorial","walkthrough","elasticsearch","react","javascript","typescript","search","search ui","search experience","site search","semantic search"]}},{kind:"MdxPage",name:"with-nextjs",route:"/docs/tutorials/with-nextjs",frontMatter:{title:"Nextjs with Searchkit",description:"Nextjs with Searchkit tutorial and walkthrough",keywords:["nextjs","searchkit","tutorial","walkthrough","elasticsearch","opensearch","react","javascript","typescript","search","search ui","search experience","site search","app search"]}}]}]},{kind:"MdxPage",name:"index",route:"/",frontMatter:{title:"Elasticsearch Site Search UI Components",keywords:"Vue, React, Angular, Instantsearch, Elasticsearch, Searchkit, Search UI Components, Search UI, Searchkit UI, Searchkit UI Components, Searchkit Components, Searchkit Instantsearch, Searchkit Instantsearch Components, Searchkit Instantsearch UI, Searchkit Instantsearch UI Compo"}}],flexsearch:{codeblocks:!1},title:"Learn to Rank",headings:l},pageNextRoute:"/docs/guides/learn-to-rank",nextraLayout:i.ZP,themeConfig:o.Z};s.default=(0,n.j)(c)},2626:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});var r=t(5893),n=t(4861),i=t(1163),o=t(992),a={project:{link:"https://github.com/searchkit/searchkit"},docsRepositoryBase:"https://github.com/searchkit/searchkit/tree/main/apps/web",useNextSeoProps:()=>({titleTemplate:"%s – Searchkit"}),toc:{float:!0},footer:{text:"Apache 2.0 ".concat(new Date().getFullYear()," \xa9 Joseph McElroy.")},editLink:{text:"Edit this page on GitHub"},logo:(0,r.jsx)("span",{className:"text-xl font-semibold text-gray-100",children:"Searchkit"}),project:{icon:function(){return(0,r.jsxs)("a",{href:"https://github.com/searchkit/searchkit",className:"hidden text-current sm:flex hover:opacity-75",title:"Searchkit GitHub repo",target:"_blank",rel:"noreferrer",children:[(0,r.jsx)("div",{className:"pr-2 text-md font-semibold",children:"4563 Stars"}),(0,r.jsx)(n.fy,{})]})},link:"https://github.com/searchkit/searchkit/tree/main"},chat:{icon:function(){return(0,r.jsx)("a",{href:"https://discord.gg/CRuWmSQZQx",className:"hidden text-current sm:flex hover:opacity-75",title:"Turbo Discord server",target:"_blank",rel:"noreferrer",children:(0,r.jsx)(n.D7,{})})},link:"https://discord.gg/CRuWmSQZQx"},nextThemes:{defaultTheme:"dark",forcedTheme:"dark"},head:()=>{let{frontMatter:e}=(0,o.ZR)(),{asPath:s}=(0,i.useRouter)(),t="https://www.searchkit.co";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("meta",{property:"og:url",content:t+s}),(0,r.jsx)("link",{rel:"canonical",href:t+s}),(0,r.jsx)("meta",{property:"og:title",content:e.title||"Searchkit - UI Widgets for Elasticsearch. React, Vue & Javascript supported"}),(0,r.jsx)("meta",{property:"og:description",content:e.description||"Searchkit - UI Widgets for Elasticsearch. React, Vue & Javascript supported"}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),(0,r.jsx)("meta",{name:"keywords",content:e.keywords||"Elasticsearch, UI Library for Elasticsearch, Opensearch, algolia instantsearch, React Search UI, Nodejs, Search UI components, NextJS Search, Elasticsearch Search UI, Instantsearch, Vue"}),(0,r.jsx)("meta",{property:"twitter:title",content:e.title}),(0,r.jsx)("meta",{property:"twitter:description",content:e.description||"Elasticsearch, UI Library for Elasticsearch, React Search UI, Nodejs, Search UI components, NextJS Search, Elasticsearch Search UI, Instantsearch"}),(0,r.jsx)("meta",{property:"twitter:url",content:t+s}),(0,r.jsx)("script",{defer:!0,src:"https://static.cloudflareinsights.com/beacon.min.js","data-cf-beacon":'{"token": "c98b302ea3bb4a33a012a7ef0ab3e240"}'})]})}}},5789:function(){}},function(e){e.O(0,[7493,9774,2888,179],function(){return e(e.s=7009)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.