[{"data":1,"prerenderedAt":5320},["ShallowReactive",2],{"navigation":3,"\u002Fservices\u002Fembeddings":927,"mdc--4y0iwl-key":5279,"mdc--hmxmq7-key":5295,"mdc-2qykxr-key":5307},[4,40,114,446,474,498,596,903],{"title":5,"path":6,"stem":7,"children":8},"Architecture","\u002Farchitecture","architecture",[9,14,28,32,36],{"title":10,"path":6,"stem":11,"access":12,"icon":13},"Overview","architecture\u002Findex","public","i-lucide-network",{"title":10,"path":15,"stem":16,"children":17,"access":12,"icon":19},"\u002Farchitecture\u002Fkernel","architecture\u002F1.kernel\u002Findex",[18,20,24],{"title":10,"path":15,"stem":16,"access":12,"icon":19},"i-lucide-box",{"title":21,"path":22,"stem":23,"access":12},"Enclave","\u002Farchitecture\u002Fkernel\u002Fenclave","architecture\u002F1.kernel\u002Fenclave",{"title":25,"path":26,"stem":27,"access":12},"Forking the enclave","\u002Farchitecture\u002Fkernel\u002Fforking-the-enclave","architecture\u002F1.kernel\u002Fforking-the-enclave",{"title":29,"path":30,"stem":31,"access":12},"Ports","\u002Farchitecture\u002Fports","architecture\u002F2.ports",{"title":33,"path":34,"stem":35,"access":12},"Service layers","\u002Farchitecture\u002Fservice-layers","architecture\u002F3.service-layers",{"title":37,"path":38,"stem":39,"access":12},"Families","\u002Farchitecture\u002Ffamilies","architecture\u002F4.families",{"title":41,"path":42,"stem":43,"children":44},"Core","\u002Fcore","core",[45,47,50,53,56,88,97],{"title":10,"path":42,"stem":46,"access":12,"icon":19},"core\u002Findex",{"title":10,"path":48,"stem":49,"access":12},"\u002Fcore\u002F01-overview","core\u002F01-overview",{"title":10,"path":51,"stem":52,"access":12},"\u002Fcore\u002F05-stores","core\u002F05-stores",{"title":10,"path":54,"stem":55,"access":12},"\u002Fcore\u002F06-permissions-and-keyring","core\u002F06-permissions-and-keyring",{"title":10,"path":57,"stem":58,"children":59,"access":12},"\u002Fcore\u002Fnoydb","core\u002F2.noydb\u002Findex",[60,61,65,68,72,76,80,84],{"title":10,"path":57,"stem":58,"access":12},{"title":62,"path":63,"stem":64,"access":12},"Noydb","\u002Fcore\u002Fnoydb\u002Fmethods","core\u002F2.noydb\u002F1.methods",{"title":21,"path":66,"stem":67,"access":12},"\u002Fcore\u002Fnoydb\u002Fenclave","core\u002F2.noydb\u002F2.enclave",{"title":69,"path":70,"stem":71,"access":12},"Secret & keyring","\u002Fcore\u002Fnoydb\u002Fkeyring","core\u002F2.noydb\u002F3.keyring",{"title":73,"path":74,"stem":75,"access":12},"Authentication","\u002Fcore\u002Fnoydb\u002Fauthentication","core\u002F2.noydb\u002F4.authentication",{"title":77,"path":78,"stem":79,"access":12},"Auth recovery","\u002Fcore\u002Fnoydb\u002Frecovery","core\u002F2.noydb\u002F5.recovery",{"title":81,"path":82,"stem":83,"access":12},"Configuration","\u002Fcore\u002Fnoydb\u002Fconfiguration","core\u002F2.noydb\u002F6.configuration",{"title":85,"path":86,"stem":87,"access":12},"Strategies","\u002Fcore\u002Fnoydb\u002Fstrategies","core\u002F2.noydb\u002F7.strategies",{"title":10,"path":89,"stem":90,"children":91,"access":12},"\u002Fcore\u002Fvault","core\u002F3.vault\u002Findex",[92,93],{"title":10,"path":89,"stem":90,"access":12},{"title":94,"path":95,"stem":96,"access":12},"Vault","\u002Fcore\u002Fvault\u002Fmethods","core\u002F3.vault\u002F1.methods",{"title":10,"path":98,"stem":99,"children":100,"access":12},"\u002Fcore\u002Fcollection","core\u002F4.collection\u002Findex",[101,102,106,110],{"title":10,"path":98,"stem":99,"access":12},{"title":103,"path":104,"stem":105,"access":12},"Collection","\u002Fcore\u002Fcollection\u002Fmethods","core\u002F4.collection\u002F1.methods",{"title":107,"path":108,"stem":109,"access":12},"Querying","\u002Fcore\u002Fcollection\u002Fquerying","core\u002F4.collection\u002F2.querying",{"title":111,"path":112,"stem":113,"access":12},"Schema","\u002Fcore\u002Fcollection\u002Fschema","core\u002F4.collection\u002F3.schema",{"title":37,"path":115,"stem":116,"children":117},"\u002Ffamilies","families",[118,121,168,194,208,212,216,294,340],{"title":10,"path":115,"stem":119,"access":12,"icon":120},"families\u002Findex","i-lucide-plug",{"title":122,"path":123,"stem":124,"children":125,"access":12,"icon":127},"as-Exports","\u002Ffamilies\u002Fas","families\u002Fas\u002Findex",[126,128,132,136,140,144,148,152,156,160,164],{"title":122,"path":123,"stem":124,"access":12,"icon":127},"i-lucide-book-open",{"title":129,"path":130,"stem":131,"access":12},"aws-s3","\u002Ffamilies\u002Fas\u002Faws-s3","families\u002Fas\u002Faws-s3",{"title":133,"path":134,"stem":135,"access":12},"blob","\u002Ffamilies\u002Fas\u002Fblob","families\u002Fas\u002Fblob",{"title":137,"path":138,"stem":139,"access":12},"csv","\u002Ffamilies\u002Fas\u002Fcsv","families\u002Fas\u002Fcsv",{"title":141,"path":142,"stem":143,"access":12},"json","\u002Ffamilies\u002Fas\u002Fjson","families\u002Fas\u002Fjson",{"title":145,"path":146,"stem":147,"access":12},"ndjson","\u002Ffamilies\u002Fas\u002Fndjson","families\u002Fas\u002Fndjson",{"title":149,"path":150,"stem":151,"access":12},"noydb","\u002Ffamilies\u002Fas\u002Fnoydb","families\u002Fas\u002Fnoydb",{"title":153,"path":154,"stem":155,"access":12},"sql","\u002Ffamilies\u002Fas\u002Fsql","families\u002Fas\u002Fsql",{"title":157,"path":158,"stem":159,"access":12},"xlsx","\u002Ffamilies\u002Fas\u002Fxlsx","families\u002Fas\u002Fxlsx",{"title":161,"path":162,"stem":163,"access":12},"xml","\u002Ffamilies\u002Fas\u002Fxml","families\u002Fas\u002Fxml",{"title":165,"path":166,"stem":167,"access":12},"zip","\u002Ffamilies\u002Fas\u002Fzip","families\u002Fas\u002Fzip",{"title":169,"path":170,"stem":171,"children":172,"access":12,"icon":127},"at-Seals","\u002Ffamilies\u002Fat","families\u002Fat\u002Findex",[173,174,178,182,186,190],{"title":169,"path":170,"stem":171,"access":12,"icon":127},{"title":175,"path":176,"stem":177,"access":12},"aws-kms","\u002Ffamilies\u002Fat\u002Faws-kms","families\u002Fat\u002Faws-kms",{"title":179,"path":180,"stem":181,"access":12},"azure-keyvault","\u002Ffamilies\u002Fat\u002Fazure-keyvault","families\u002Fat\u002Fazure-keyvault",{"title":183,"path":184,"stem":185,"access":12},"env","\u002Ffamilies\u002Fat\u002Fenv","families\u002Fat\u002Fenv",{"title":187,"path":188,"stem":189,"access":12},"gcp-kms","\u002Ffamilies\u002Fat\u002Fgcp-kms","families\u002Fat\u002Fgcp-kms",{"title":191,"path":192,"stem":193,"access":12},"macos-keychain","\u002Ffamilies\u002Fat\u002Fmacos-keychain","families\u002Fat\u002Fmacos-keychain",{"title":195,"path":196,"stem":197,"children":198,"access":12,"icon":127},"by-Sessions","\u002Ffamilies\u002Fby","families\u002Fby\u002Findex",[199,200,204],{"title":195,"path":196,"stem":197,"access":12,"icon":127},{"title":201,"path":202,"stem":203,"access":12},"peer","\u002Ffamilies\u002Fby\u002Fpeer","families\u002Fby\u002Fpeer",{"title":205,"path":206,"stem":207,"access":12},"tabs","\u002Ffamilies\u002Fby\u002Ftabs","families\u002Fby\u002Ftabs",{"title":209,"path":210,"stem":211,"access":12},"Classifying a package","\u002Ffamilies\u002Fclassification","families\u002Fclassification",{"title":213,"path":214,"stem":215,"access":12},"Command-line tools","\u002Ffamilies\u002Fcli","families\u002Fcli",{"title":217,"path":218,"stem":219,"children":220,"access":12,"icon":127},"in-Frameworks","\u002Ffamilies\u002Fin","families\u002Fin\u002Findex",[221,222,226,230,234,238,242,246,250,254,258,262,266,270,274,278,282,286,290],{"title":217,"path":218,"stem":219,"access":12,"icon":127},{"title":223,"path":224,"stem":225,"access":12},"ai","\u002Ffamilies\u002Fin\u002Fai","families\u002Fin\u002Fai",{"title":227,"path":228,"stem":229,"access":12},"devtools","\u002Ffamilies\u002Fin\u002Fdevtools","families\u002Fin\u002Fdevtools",{"title":231,"path":232,"stem":233,"access":12},"devtools-tui","\u002Ffamilies\u002Fin\u002Fdevtools-tui","families\u002Fin\u002Fdevtools-tui",{"title":235,"path":236,"stem":237,"access":12},"liff","\u002Ffamilies\u002Fin\u002Fliff","families\u002Fin\u002Fliff",{"title":239,"path":240,"stem":241,"access":12},"nextjs","\u002Ffamilies\u002Fin\u002Fnextjs","families\u002Fin\u002Fnextjs",{"title":243,"path":244,"stem":245,"access":12},"nuxt","\u002Ffamilies\u002Fin\u002Fnuxt","families\u002Fin\u002Fnuxt",{"title":247,"path":248,"stem":249,"access":12},"pinia","\u002Ffamilies\u002Fin\u002Fpinia","families\u002Fin\u002Fpinia",{"title":251,"path":252,"stem":253,"access":12},"pwa","\u002Ffamilies\u002Fin\u002Fpwa","families\u002Fin\u002Fpwa",{"title":255,"path":256,"stem":257,"access":12},"react","\u002Ffamilies\u002Fin\u002Freact","families\u002Fin\u002Freact",{"title":259,"path":260,"stem":261,"access":12},"relay","\u002Ffamilies\u002Fin\u002Frelay","families\u002Fin\u002Frelay",{"title":263,"path":264,"stem":265,"access":12},"rest","\u002Ffamilies\u002Fin\u002Frest","families\u002Fin\u002Frest",{"title":267,"path":268,"stem":269,"access":12},"solid","\u002Ffamilies\u002Fin\u002Fsolid","families\u002Fin\u002Fsolid",{"title":271,"path":272,"stem":273,"access":12},"svelte","\u002Ffamilies\u002Fin\u002Fsvelte","families\u002Fin\u002Fsvelte",{"title":275,"path":276,"stem":277,"access":12},"tanstack-query","\u002Ffamilies\u002Fin\u002Ftanstack-query","families\u002Fin\u002Ftanstack-query",{"title":279,"path":280,"stem":281,"access":12},"tanstack-table","\u002Ffamilies\u002Fin\u002Ftanstack-table","families\u002Fin\u002Ftanstack-table",{"title":283,"path":284,"stem":285,"access":12},"vue","\u002Ffamilies\u002Fin\u002Fvue","families\u002Fin\u002Fvue",{"title":287,"path":288,"stem":289,"access":12},"yjs","\u002Ffamilies\u002Fin\u002Fyjs","families\u002Fin\u002Fyjs",{"title":291,"path":292,"stem":293,"access":12},"zustand","\u002Ffamilies\u002Fin\u002Fzustand","families\u002Fin\u002Fzustand",{"title":295,"path":296,"stem":297,"children":298,"access":12,"icon":127},"on-Auth","\u002Ffamilies\u002Fon","families\u002Fon\u002Findex",[299,300,304,308,312,316,320,324,328,332,336],{"title":295,"path":296,"stem":297,"access":12,"icon":127},{"title":301,"path":302,"stem":303,"access":12},"email-otp","\u002Ffamilies\u002Fon\u002Femail-otp","families\u002Fon\u002Femail-otp",{"title":305,"path":306,"stem":307,"access":12},"magic-link","\u002Ffamilies\u002Fon\u002Fmagic-link","families\u002Fon\u002Fmagic-link",{"title":309,"path":310,"stem":311,"access":12},"oidc","\u002Ffamilies\u002Fon\u002Foidc","families\u002Fon\u002Foidc",{"title":313,"path":314,"stem":315,"access":12},"password","\u002Ffamilies\u002Fon\u002Fpassword","families\u002Fon\u002Fpassword",{"title":317,"path":318,"stem":319,"access":12},"pin","\u002Ffamilies\u002Fon\u002Fpin","families\u002Fon\u002Fpin",{"title":321,"path":322,"stem":323,"access":12},"recovery","\u002Ffamilies\u002Fon\u002Frecovery","families\u002Fon\u002Frecovery",{"title":325,"path":326,"stem":327,"access":12},"shamir","\u002Ffamilies\u002Fon\u002Fshamir","families\u002Fon\u002Fshamir",{"title":329,"path":330,"stem":331,"access":12},"threat","\u002Ffamilies\u002Fon\u002Fthreat","families\u002Fon\u002Fthreat",{"title":333,"path":334,"stem":335,"access":12},"totp","\u002Ffamilies\u002Fon\u002Ftotp","families\u002Fon\u002Ftotp",{"title":337,"path":338,"stem":339,"access":12},"webauthn","\u002Ffamilies\u002Fon\u002Fwebauthn","families\u002Fon\u002Fwebauthn",{"title":341,"path":342,"stem":343,"children":344,"access":12,"icon":127},"to-Stores","\u002Ffamilies\u002Fto","families\u002Fto\u002Findex",[345,346,350,353,357,361,365,370,374,378,382,386,390,394,398,402,406,410,414,417,421,425,429,434,438,442],{"title":341,"path":342,"stem":343,"access":12,"icon":127},{"title":347,"path":348,"stem":349,"access":12},"aws-dynamo","\u002Ffamilies\u002Fto\u002Faws-dynamo","families\u002Fto\u002Faws-dynamo",{"title":129,"path":351,"stem":352,"access":12},"\u002Ffamilies\u002Fto\u002Faws-s3","families\u002Fto\u002Faws-s3",{"title":354,"path":355,"stem":356,"access":12},"browser-fs","\u002Ffamilies\u002Fto\u002Fbrowser-fs","families\u002Fto\u002Fbrowser-fs",{"title":358,"path":359,"stem":360,"access":12},"browser-idb","\u002Ffamilies\u002Fto\u002Fbrowser-idb","families\u002Fto\u002Fbrowser-idb",{"title":362,"path":363,"stem":364,"access":12},"browser-local","\u002Ffamilies\u002Fto\u002Fbrowser-local","families\u002Fto\u002Fbrowser-local",{"title":366,"path":367,"stem":368,"access":12,"icon":369},"Choosing a store","\u002Ffamilies\u002Fto\u002Fchoosing-a-store","families\u002Fto\u002Fchoosing-a-store","i-lucide-split",{"title":371,"path":372,"stem":373,"access":12},"cloudflare-d1","\u002Ffamilies\u002Fto\u002Fcloudflare-d1","families\u002Fto\u002Fcloudflare-d1",{"title":375,"path":376,"stem":377,"access":12},"cloudflare-r2","\u002Ffamilies\u002Fto\u002Fcloudflare-r2","families\u002Fto\u002Fcloudflare-r2",{"title":379,"path":380,"stem":381,"access":12},"drive","\u002Ffamilies\u002Fto\u002Fdrive","families\u002Fto\u002Fdrive",{"title":383,"path":384,"stem":385,"access":12},"file","\u002Ffamilies\u002Fto\u002Ffile","families\u002Fto\u002Ffile",{"title":387,"path":388,"stem":389,"access":12},"icloud","\u002Ffamilies\u002Fto\u002Ficloud","families\u002Fto\u002Ficloud",{"title":391,"path":392,"stem":393,"access":12},"memory","\u002Ffamilies\u002Fto\u002Fmemory","families\u002Fto\u002Fmemory",{"title":395,"path":396,"stem":397,"access":12},"meter","\u002Ffamilies\u002Fto\u002Fmeter","families\u002Fto\u002Fmeter",{"title":399,"path":400,"stem":401,"access":12},"mysql","\u002Ffamilies\u002Fto\u002Fmysql","families\u002Fto\u002Fmysql",{"title":403,"path":404,"stem":405,"access":12},"nfs","\u002Ffamilies\u002Fto\u002Fnfs","families\u002Fto\u002Fnfs",{"title":407,"path":408,"stem":409,"access":12},"postgres","\u002Ffamilies\u002Fto\u002Fpostgres","families\u002Fto\u002Fpostgres",{"title":411,"path":412,"stem":413,"access":12},"probe","\u002Ffamilies\u002Fto\u002Fprobe","families\u002Fto\u002Fprobe",{"title":263,"path":415,"stem":416,"access":12},"\u002Ffamilies\u002Fto\u002Frest","families\u002Fto\u002Frest",{"title":418,"path":419,"stem":420,"access":12},"smb","\u002Ffamilies\u002Fto\u002Fsmb","families\u002Fto\u002Fsmb",{"title":422,"path":423,"stem":424,"access":12},"sqlite","\u002Ffamilies\u002Fto\u002Fsqlite","families\u002Fto\u002Fsqlite",{"title":426,"path":427,"stem":428,"access":12},"ssh","\u002Ffamilies\u002Fto\u002Fssh","families\u002Fto\u002Fssh",{"title":430,"path":431,"stem":432,"access":12,"icon":433},"Store-locator descriptors","\u002Ffamilies\u002Fto\u002Fstore-locator","families\u002Fto\u002Fstore-locator","i-lucide-map-pin",{"title":435,"path":436,"stem":437,"access":12},"supabase","\u002Ffamilies\u002Fto\u002Fsupabase","families\u002Fto\u002Fsupabase",{"title":439,"path":440,"stem":441,"access":12},"turso","\u002Ffamilies\u002Fto\u002Fturso","families\u002Fto\u002Fturso",{"title":443,"path":444,"stem":445,"access":12},"webdav","\u002Ffamilies\u002Fto\u002Fwebdav","families\u002Fto\u002Fwebdav",{"title":447,"path":448,"stem":449,"children":450},"Faq","\u002Ffaq","faq",[451,454,458,462,466,470],{"title":10,"path":448,"stem":452,"access":12,"icon":453},"faq\u002Findex","i-lucide-circle-help",{"title":455,"path":456,"stem":457,"access":12},"Where can noy-db run?","\u002Ffaq\u002Fwhere-can-noy-db-run","faq\u002F1.where-can-noy-db-run",{"title":459,"path":460,"stem":461,"access":12},"Native mobile & PWA","\u002Ffaq\u002Fmobile-and-pwa","faq\u002F2.mobile-and-pwa",{"title":463,"path":464,"stem":465,"access":12},"Threat model","\u002Ffaq\u002Fthreat-model","faq\u002F3.threat-model",{"title":467,"path":468,"stem":469,"access":12},"Community & ecosystem","\u002Ffaq\u002Fcommunity-and-ecosystem","faq\u002F4.community-and-ecosystem",{"title":471,"path":472,"stem":473,"access":12},"Licensing","\u002Ffaq\u002Flicensing","faq\u002F5.licensing",{"title":475,"path":476,"stem":477,"children":478},"Glossary","\u002Fglossary","glossary",[479,482,486,490,494],{"title":10,"path":476,"stem":480,"access":12,"icon":481},"glossary\u002Findex","i-lucide-book-a",{"title":483,"path":484,"stem":485,"access":12},"Core vocabulary","\u002Fglossary\u002Fcore-vocabulary","glossary\u002Fcore-vocabulary",{"title":487,"path":488,"stem":489,"access":12},"Deletion vocabulary","\u002Fglossary\u002Fdeletion","glossary\u002Fdeletion",{"title":491,"path":492,"stem":493,"access":12},"Satellite collection vocabulary","\u002Fglossary\u002Fsatellite-collections","glossary\u002Fsatellite-collections",{"title":495,"path":496,"stem":497,"access":12},"Schema migration vocabulary","\u002Fglossary\u002Fschema-migration","glossary\u002Fschema-migration",{"title":499,"path":500,"stem":501,"children":502},"Recipes","\u002Frecipes","recipes",[503,506,510,514,518,522,526,530,534,538,542,546,550,554,558,562,567,571,575,580,584,588,592],{"title":10,"path":500,"stem":504,"access":12,"icon":505},"recipes\u002Findex","i-lucide-play",{"title":507,"path":508,"stem":509,"access":12},"Accounting app","\u002Frecipes\u002Faccounting-app","recipes\u002Faccounting-app",{"title":511,"path":512,"stem":513,"access":12},"Analytics app","\u002Frecipes\u002Fanalytics-app","recipes\u002Fanalytics-app",{"title":515,"path":516,"stem":517,"access":12},"Attestation verifier","\u002Frecipes\u002Fattestation-verifier","recipes\u002Fattestation-verifier",{"title":519,"path":520,"stem":521,"access":12},"AWS-KMS attestation","\u002Frecipes\u002Faws-kms-pdf-attestation","recipes\u002Faws-kms-pdf-attestation",{"title":523,"path":524,"stem":525,"access":12},"Browser durability","\u002Frecipes\u002Fbrowser-durability","recipes\u002Fbrowser-durability",{"title":527,"path":528,"stem":529,"access":12},"Production cloud store","\u002Frecipes\u002Fcloud-store","recipes\u002Fcloud-store",{"title":531,"path":532,"stem":533,"access":12},"Compose your own setup","\u002Frecipes\u002Fcompose-your-own","recipes\u002Fcompose-your-own",{"title":535,"path":536,"stem":537,"access":12},"Confidential HR records","\u002Frecipes\u002Fconfidential-hr","recipes\u002Fconfidential-hr",{"title":539,"path":540,"stem":541,"access":12},"Composing an echo secret","\u002Frecipes\u002Fecho-secret-enrollment","recipes\u002Fecho-secret-enrollment",{"title":543,"path":544,"stem":545,"access":12},"Email archive","\u002Frecipes\u002Femail-archive","recipes\u002Femail-archive",{"title":547,"path":548,"stem":549,"access":12},"Email archive — threads & revisions","\u002Frecipes\u002Femail-archive-threads-revisions","recipes\u002Femail-archive-threads-revisions",{"title":551,"path":552,"stem":553,"access":12},"Export & portability","\u002Frecipes\u002Fexport-portability","recipes\u002Fexport-portability",{"title":555,"path":556,"stem":557,"access":12},"Passwordless OIDC (AWS Cognito)","\u002Frecipes\u002Fpasswordless-oidc","recipes\u002Fpasswordless-oidc",{"title":559,"path":560,"stem":561,"access":12},"Personal notebook","\u002Frecipes\u002Fpersonal-notebook","recipes\u002Fpersonal-notebook",{"title":563,"path":564,"stem":565,"access":12,"icon":566},"Playgrounds","\u002Frecipes\u002Fplaygrounds","recipes\u002Fplaygrounds","i-lucide-gamepad-2",{"title":568,"path":569,"stem":570,"access":12},"React invoice app","\u002Frecipes\u002Freact-invoices","recipes\u002Freact-invoices",{"title":572,"path":573,"stem":574,"access":12},"Collaborative app","\u002Frecipes\u002Frealtime-crdt-app","recipes\u002Frealtime-crdt-app",{"title":576,"path":577,"stem":578,"access":12,"icon":579},"Run the showcases","\u002Frecipes\u002Frun-the-showcases","recipes\u002Frun-the-showcases","i-lucide-flask-conical",{"title":581,"path":582,"stem":583,"access":12},"Search & RAG","\u002Frecipes\u002Fsearch-rag","recipes\u002Fsearch-rag",{"title":585,"path":586,"stem":587,"access":12},"Team vault topology","\u002Frecipes\u002Fteam-vault-topology","recipes\u002Fteam-vault-topology",{"title":589,"path":590,"stem":591,"access":12},"Unlock ceremonies","\u002Frecipes\u002Funlock-ceremonies","recipes\u002Funlock-ceremonies",{"title":593,"path":594,"stem":595,"access":12},"User preferences","\u002Frecipes\u002Fuser-preferences","recipes\u002Fuser-preferences",{"title":597,"path":598,"stem":599,"children":600},"Services","\u002Fservices","services",[601,604,608,612,616,620,624,628,632,636,640,644,648,652,656,660,664,668,672,676,680,684,688,692,696,700,704,710,714,718,722,726,730,734,738,742,746,750,755,759,763,767,771,775,779,783,787,791,795,799,803,807,811,815,819,823,827,831,835,839,843,847,851,855,859,863,867,871,875,879,883,887,891,895,899],{"title":10,"path":598,"stem":602,"access":12,"icon":603},"services\u002Findex","i-lucide-layers",{"title":605,"path":606,"stem":607,"access":12},"archive","\u002Fservices\u002Farchive","services\u002Farchive",{"title":609,"path":610,"stem":611,"access":12},"attestation","\u002Fservices\u002Fattestation","services\u002Fattestation",{"title":613,"path":614,"stem":615,"access":12},"auth-introspection","\u002Fservices\u002Fauth-introspection","services\u002Fauth-introspection",{"title":617,"path":618,"stem":619,"access":12},"auth-landscape","\u002Fservices\u002Fauth-landscape","services\u002Fauth-landscape",{"title":621,"path":622,"stem":623,"access":12},"blobs","\u002Fservices\u002Fblobs","services\u002Fblobs",{"title":625,"path":626,"stem":627,"access":12},"broker","\u002Fservices\u002Fbroker","services\u002Fbroker",{"title":629,"path":630,"stem":631,"access":12},"bundle","\u002Fservices\u002Fbundle","services\u002Fbundle",{"title":633,"path":634,"stem":635,"access":12},"classified","\u002Fservices\u002Fclassified","services\u002Fclassified",{"title":637,"path":638,"stem":639,"access":12},"computed","\u002Fservices\u002Fcomputed","services\u002Fcomputed",{"title":641,"path":642,"stem":643,"access":12},"consent","\u002Fservices\u002Fconsent","services\u002Fconsent",{"title":645,"path":646,"stem":647,"access":12},"cover","\u002Fservices\u002Fcover","services\u002Fcover",{"title":649,"path":650,"stem":651,"access":12},"coverage","\u002Fservices\u002Fcoverage","services\u002Fcoverage",{"title":653,"path":654,"stem":655,"access":12},"crdt","\u002Fservices\u002Fcrdt","services\u002Fcrdt",{"title":657,"path":658,"stem":659,"access":12},"cross-join","\u002Fservices\u002Fcross-join","services\u002Fcross-join",{"title":661,"path":662,"stem":663,"access":12},"custody","\u002Fservices\u002Fcustody","services\u002Fcustody",{"title":665,"path":666,"stem":667,"access":12},"derivations","\u002Fservices\u002Fderivations","services\u002Fderivations",{"title":669,"path":670,"stem":671,"access":12},"directory","\u002Fservices\u002Fdirectory","services\u002Fdirectory",{"title":673,"path":674,"stem":675,"access":12},"search — AI","\u002Fservices\u002Fembeddings","services\u002Fembeddings",{"title":677,"path":678,"stem":679,"access":12},"Field metadata","\u002Fservices\u002Ffield-metadata","services\u002Ffield-metadata",{"title":681,"path":682,"stem":683,"access":12},"Foreign refs","\u002Fservices\u002Fforeign-refs","services\u002Fforeign-refs",{"title":685,"path":686,"stem":687,"access":12},"forget","\u002Fservices\u002Fforget","services\u002Fforget",{"title":689,"path":690,"stem":691,"access":12},"governance","\u002Fservices\u002Fgovernance","services\u002Fgovernance",{"title":693,"path":694,"stem":695,"access":12},"guards","\u002Fservices\u002Fguards","services\u002Fguards",{"title":697,"path":698,"stem":699,"access":12},"history","\u002Fservices\u002Fhistory","services\u002Fhistory",{"title":701,"path":702,"stem":703,"access":12},"i18n","\u002Fservices\u002Fi18n","services\u002Fi18n",{"title":705,"path":706,"stem":707,"children":708,"access":12},"indexing","\u002Fservices\u002Findexing","services\u002Findexing",[709],{"title":705,"path":706,"stem":707,"access":12},{"title":711,"path":712,"stem":713,"access":12},"introspection","\u002Fservices\u002Fintrospection","services\u002Fintrospection",{"title":715,"path":716,"stem":717,"access":12},"joins","\u002Fservices\u002Fjoins","services\u002Fjoins",{"title":719,"path":720,"stem":721,"access":12},"lazy","\u002Fservices\u002Flazy","services\u002Flazy",{"title":723,"path":724,"stem":725,"access":12},"links","\u002Fservices\u002Flinks","services\u002Flinks",{"title":727,"path":728,"stem":729,"access":12},"live","\u002Fservices\u002Flive","services\u002Flive",{"title":731,"path":732,"stem":733,"access":12},"lookup","\u002Fservices\u002Flookup","services\u002Flookup",{"title":735,"path":736,"stem":737,"access":12},"manifest","\u002Fservices\u002Fmanifest","services\u002Fmanifest",{"title":739,"path":740,"stem":741,"access":12},"materialized-views","\u002Fservices\u002Fmaterialized-views","services\u002Fmaterialized-views",{"title":743,"path":744,"stem":745,"access":12},"Metadata ladder","\u002Fservices\u002Fmetadata-ladder","services\u002Fmetadata-ladder",{"title":747,"path":748,"stem":749,"access":12},"Metadata riders","\u002Fservices\u002Fmetadata-riders","services\u002Fmetadata-riders",{"title":751,"path":752,"stem":753,"access":12,"badge":754},"metrics","\u002Fservices\u002Fmetrics","services\u002Fmetrics","Planned",{"title":756,"path":757,"stem":758,"access":12,"badge":754},"migrations","\u002Fservices\u002Fmigrations","services\u002Fmigrations",{"title":760,"path":761,"stem":762,"access":12},"money","\u002Fservices\u002Fmoney","services\u002Fmoney",{"title":764,"path":765,"stem":766,"access":12},"numbering","\u002Fservices\u002Fnumbering","services\u002Fnumbering",{"title":768,"path":769,"stem":770,"access":12},"overlay-views","\u002Fservices\u002Foverlay-views","services\u002Foverlay-views",{"title":772,"path":773,"stem":774,"access":12,"badge":754},"partitioning","\u002Fservices\u002Fpartitioning","services\u002Fpartitioning",{"title":776,"path":777,"stem":778,"access":12},"periods","\u002Fservices\u002Fperiods","services\u002Fperiods",{"title":780,"path":781,"stem":782,"access":12},"persisted-schemas","\u002Fservices\u002Fpersisted-schemas","services\u002Fpersisted-schemas",{"title":784,"path":785,"stem":786,"access":12},"plaintext-bypass","\u002Fservices\u002Fplaintext-bypass","services\u002Fplaintext-bypass",{"title":788,"path":789,"stem":790,"access":12},"pod-redirect","\u002Fservices\u002Fpod-redirect","services\u002Fpod-redirect",{"title":792,"path":793,"stem":794,"access":12},"pod-signature","\u002Fservices\u002Fpod-signature","services\u002Fpod-signature",{"title":796,"path":797,"stem":798,"access":12},"policy","\u002Fservices\u002Fpolicy","services\u002Fpolicy",{"title":800,"path":801,"stem":802,"access":12},"portability","\u002Fservices\u002Fportability","services\u002Fportability",{"title":804,"path":805,"stem":806,"access":12},"reduce","\u002Fservices\u002Freduce","services\u002Freduce",{"title":808,"path":809,"stem":810,"access":12},"routing","\u002Fservices\u002Frouting","services\u002Frouting",{"title":812,"path":813,"stem":814,"access":12},"satellites","\u002Fservices\u002Fsatellites","services\u002Fsatellites",{"title":816,"path":817,"stem":818,"access":12},"schema-identifiers","\u002Fservices\u002Fschema-identifiers","services\u002Fschema-identifiers",{"title":820,"path":821,"stem":822,"access":12},"schema-update","\u002Fservices\u002Fschema-update","services\u002Fschema-update",{"title":824,"path":825,"stem":826,"access":12},"sealed-record","\u002Fservices\u002Fsealed-record","services\u002Fsealed-record",{"title":828,"path":829,"stem":830,"access":12},"sealing provider id","\u002Fservices\u002Fsealing-pid-stability","services\u002Fsealing-pid-stability",{"title":832,"path":833,"stem":834,"access":12},"search — full-text","\u002Fservices\u002Fsearch","services\u002Fsearch",{"title":836,"path":837,"stem":838,"access":12},"sequence","\u002Fservices\u002Fsequence","services\u002Fsequence",{"title":840,"path":841,"stem":842,"access":12},"session","\u002Fservices\u002Fsession","services\u002Fsession",{"title":844,"path":845,"stem":846,"access":12},"session-tiers","\u002Fservices\u002Fsession-tiers","services\u002Fsession-tiers",{"title":848,"path":849,"stem":850,"access":12},"shadow","\u002Fservices\u002Fshadow","services\u002Fshadow",{"title":852,"path":853,"stem":854,"access":12},"share-link","\u002Fservices\u002Fshare-link","services\u002Fshare-link",{"title":856,"path":857,"stem":858,"access":12},"snapshots","\u002Fservices\u002Fsnapshots","services\u002Fsnapshots",{"title":860,"path":861,"stem":862,"access":12},"store capabilities","\u002Fservices\u002Fstorage-capability-matrix","services\u002Fstorage-capability-matrix",{"title":864,"path":865,"stem":866,"access":12},"sync","\u002Fservices\u002Fsync","services\u002Fsync",{"title":868,"path":869,"stem":870,"access":12},"team","\u002Fservices\u002Fteam","services\u002Fteam",{"title":872,"path":873,"stem":874,"access":12},"tiers","\u002Fservices\u002Ftiers","services\u002Ftiers",{"title":876,"path":877,"stem":878,"access":12},"transactions","\u002Fservices\u002Ftransactions","services\u002Ftransactions",{"title":880,"path":881,"stem":882,"access":12},"partitions","\u002Fservices\u002Ftransferable-partitions","services\u002Ftransferable-partitions",{"title":884,"path":885,"stem":886,"access":12},"user-envelope","\u002Fservices\u002Fuser-envelope","services\u002Fuser-envelope",{"title":888,"path":889,"stem":890,"access":12,"badge":754},"validation","\u002Fservices\u002Fvalidation","services\u002Fvalidation",{"title":892,"path":893,"stem":894,"access":12},"vault-head","\u002Fservices\u002Fvault-head","services\u002Fvault-head",{"title":896,"path":897,"stem":898,"access":12},"via","\u002Fservices\u002Fvia","services\u002Fvia",{"title":900,"path":901,"stem":902,"access":12},"withdrawal","\u002Fservices\u002Fwithdrawal","services\u002Fwithdrawal",{"title":904,"path":905,"stem":906,"children":907},"Start","\u002Fstart","start",[908,911,915,919,923],{"title":10,"path":905,"stem":909,"access":12,"icon":910},"start\u002Findex","i-lucide-flag",{"title":912,"path":913,"stem":914,"access":12},"Install","\u002Fstart\u002Finstall","start\u002F1.install",{"title":916,"path":917,"stem":918,"access":12},"Your first vault","\u002Fstart\u002Ffirst-vault","start\u002F2.first-vault",{"title":920,"path":921,"stem":922,"access":12},"Your first service","\u002Fstart\u002Ffirst-service","start\u002F3.first-service",{"title":924,"path":925,"stem":926,"access":12},"See the ciphertext","\u002Fstart\u002Fsee-the-ciphertext","start\u002F4.see-the-ciphertext",{"id":928,"title":673,"access":12,"apiToc":929,"body":930,"category":5269,"description":5270,"extension":5271,"meta":5272,"navigation":5269,"nest":5273,"path":674,"seo":5274,"sinceVersion":5269,"status":5275,"stem":675,"subtitle":5276,"tier":5277,"tocExternal":5269,"__hash__":5278},"docs\u002Fservices\u002Fembeddings.md",false,{"type":931,"value":932,"toc":5233},"minimark",[933,937,941,945,997,1002,1029,1044,1086,1089,1125,1129,1188,1192,1213,1584,1623,1631,1654,1686,2554,2572,2576,2583,2635,2887,2899,3030,3117,3127,3134,3258,3265,3268,3332,3493,3510,3516,3703,3710,3736,3784,3949,3974,3983,3989,4011,4113,4202,4232,4252,4259,4276,4383,4389,4396,4459,4463,4469,4561,4570,4576,4663,4668,4730,4737,4743,4780,4790,4794,4810,4829,4835,4851,4888,4944,4948,4965,4975,5001,5008,5021,5025,5173,5177,5229],[934,935,673],"h1",{"id":936},"search-ai",[938,939],"service-meta",{":rows":940},"[{\"label\":\"Subpath\",\"value\":\"`@noy-db\u002Fhub` (root export — no separate subpath)\"},{\"label\":\"Factory\",\"value\":\"`withSearch()`\"},{\"label\":\"Layer\",\"value\":\"`with-lookup`\"}]",[942,943,944],"p",{},"This service is in preview: the API on this page is usable but may still change before it stabilizes.",[946,947,949],"callout",{"color":948,"icon":369},"neutral",[942,950,951,955,956,959,960,964,965,968,969,973,974,977,978,981,982,968,985,988,989,992,993,996],{},[952,953,954],"strong",{},"Two pages, one subsystem."," This page and ",[957,958,832],"a",{"href":833}," are facets of a single retrieval engine behind the same ",[961,962,963],"code",{},"withSearch()"," factory. ",[952,966,967],{},"This page",": matching ",[970,971,972],"em",{},"meaning"," — semantic retrieval via an ",[961,975,976],{},"embeddings"," encoder you configure per collection, ",[961,979,980],{},"similarTo()",", and hybrid lexical⊕semantic fusion. ",[952,983,984],{},"The other page",[970,986,987],{},"words"," — full-text ",[961,990,991],{},"search()"," and indexed lexical ",[961,994,995],{},"retrieve()",". Opting in once enables both, but semantic modes additionally require the encoder (a text→vector function you supply).",[998,999,1001],"h2",{"id":1000},"what-it-does","What it does",[942,1003,1004,1007,1008,1010,1011,1013,1014,1016,1017,1020,1021,1024,1025,1028],{},[952,1005,1006],{},"Semantic search"," finds records by ",[970,1009,972],{}," instead of exact words: \"overdue invoice\" can match a record that says \"payment past due\" even though no word overlaps. It works through ",[952,1012,976],{}," — you configure an ",[961,1015,976],{}," option on a collection with a function that turns text into a vector (a fixed-length array of numbers), call it your ",[952,1018,1019],{},"encoder",". noy-db runs that encoder over each record as you write it, encrypts the resulting vector under the collection's ",[957,1022,1023],{"href":66},"data-encryption key (DEK)"," — the same per-collection key that encrypts every record body — and stores it in a reserved ",[961,1026,1027],{},"_vec"," side-car, one per record. To search, noy-db encodes your query the same way and ranks stored vectors by cosine similarity (how closely two vectors point in the same direction) against the query vector, entirely after decrypting in memory — the storage backend never sees a vector or the text it came from.",[942,1030,1031,1032,1035,1036,1039,1040,1043],{},"This page also covers ",[952,1033,1034],{},"hybrid retrieval",": fusing this semantic ranking with the keyword-based ranking from ",[957,1037,1038],{"href":833},"Search"," into one result list, and the ",[961,1041,1042],{},"within"," option for intersecting a retrieve call with a structured query.",[946,1045,1047],{"color":948,"icon":1046},"i-lucide-folder-tree",[942,1048,1049,1052,1053,1056,1057,1059,1060,1063,1064,1067,1068,1070,1071,1073,1074,1077,1078,1082,1083,1085],{},[952,1050,1051],{},"Sidecars are collection-namespaced."," Since ",[961,1054,1055],{},"0.3.0-pre.13"," a ",[961,1058,1027],{}," sidecar is keyed by\n",[961,1061,1062],{},"\u003Ccollection>\u002F\u003CrecordId>",", not a bare record id — the store bucket stays the literal ",[961,1065,1066],{},"'_vec'",",\nbut the row id is composite. Before this, two collections that happened to share a record id\nshared one sidecar, so a write in one collection could clobber or delete the other's vector, and a\n",[961,1069,980],{}," \u002F cold semantic ",[961,1072,995],{}," that met a foreign same-id row threw an uncaught\n",[961,1075,1076],{},"TamperedError",". This was never a confidentiality leak — each collection has its own DEK and\nAES-GCM auth-tag verification turns a wrong-key decrypt into a throw, never wrong plaintext — but\nit was an id-collision bug (clobber + crash). See ",[957,1079,1081],{"href":1080},"#migrating-existing-vectors","migration"," below if\nyou already populated embeddings before ",[961,1084,1055],{},".",[942,1087,1088],{},"Key properties:",[1090,1091,1092,1103,1113,1119],"ul",{},[1093,1094,1095,1098,1099,1102],"li",{},[952,1096,1097],{},"Zero-knowledge"," — the store sees only ciphertext per ",[961,1100,1101],{},"_vec\u002F\u003Cid>"," record; vector values and source text never leave the trusted tier (the part of the stack that holds decryption keys and plaintext).",[1093,1104,1105,1108,1109,1112],{},[952,1106,1107],{},"No bundled model"," — the ",[961,1110,1111],{},"encode"," function is yours to supply, calling any local or remote embedding API. noy-db ships no model.",[1093,1114,1115,1118],{},[952,1116,1117],{},"Brute-force cosine"," — every query scores every stored vector; there is no approximate-nearest-neighbour index (HNSW\u002FIVF) yet, so this is best suited to collections up to roughly the tens of thousands of records.",[1093,1120,1121,1124],{},[952,1122,1123],{},"Encrypted-local only"," — a backend that received plaintext vectors (a managed vector database) could have those vectors inverted back toward the source text, defeating zero-knowledge. That integration path does not exist yet; vectors stay encrypted-local.",[998,1126,1128],{"id":1127},"prerequisites","Prerequisites",[1090,1130,1131,1143,1164,1180],{},[1093,1132,1133,1138,1139,1142],{},[952,1134,1135],{},[961,1136,1137],{},"searchStrategy: withSearch()"," — semantic and hybrid retrieval are part of the same opt-in as lexical ",[957,1140,1141],{"href":833},"search","; one factory enables both.",[1093,1144,1145,1151,1152,1155,1156,1159,1160,1163],{},[952,1146,1147,1148,1150],{},"An ",[961,1149,976],{}," config on the collection"," — your encoder function plus matching ",[961,1153,1154],{},"dim"," and ",[961,1157,1158],{},"model",". The encoder is a part ",[970,1161,1162],{},"you"," supply; whatever runs inside it sees plaintext, so an on-device encoder keeps the zero-knowledge guarantee end-to-end while a hosted API adds that provider as a reader.",[1093,1165,1166,1173,1174,1176,1177,1179],{},[970,1167,1168,1169,1172],{},"For ",[961,1170,1171],{},"mode: 'hybrid'",":"," the same ",[961,1175,976],{}," config must be present, or ",[961,1178,995],{}," throws.",[1093,1181,1182,1187],{},[970,1183,1168,1184,1186],{},[961,1185,1042],{}," intersection:"," eager mode (the default) — lazy collections are unsupported there.",[998,1189,1191],{"id":1190},"opt-in","Opt in",[942,1193,1194,1195,1197,1198,1202,1203,1205,1206,1209,1210,1212],{},"Semantic and hybrid retrieval are part of the same opt-in ",[961,1196,1141],{}," capability as lexical ",[957,1199,1200],{"href":833},[961,1201,995],{},": pass ",[961,1204,1137],{}," to ",[961,1207,1208],{},"createNoydb()",", then declare ",[961,1211,976],{}," on the collection you want to search semantically.",[1214,1215,1220],"pre",{"className":1216,"code":1217,"language":1218,"meta":1219,"style":1219},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createNoydb, withSearch } from '@noy-db\u002Fhub'\n\nconst db = await createNoydb({\n  user: 'alice',\n  secret: 'alice-secret-2026',\n  searchStrategy: withSearch(),\n})\nconst vault = await db.openVault('books')\n\ninterface Doc { id: string; text: string }\n\nconst docs = vault.collection\u003CDoc>('docs', {\n  embeddings: {\n    source: 'text',                                 \u002F\u002F field path(s) to embed\n    encode: async (text) => myEmbeddingApi(text),    \u002F\u002F your encoder — see \"Supplying an encode function\" below\n    dim: 1536,                                       \u002F\u002F expected vector length\n    model: 'text-embedding-3-small',                 \u002F\u002F version tag, checked on every retrieval\n  },\n})\n","ts","",[961,1221,1222,1261,1268,1293,1313,1330,1345,1354,1385,1390,1423,1428,1469,1479,1500,1534,1551,1571,1577],{"__ignoreMap":1219},[1223,1224,1227,1231,1235,1239,1242,1245,1248,1251,1254,1258],"span",{"class":1225,"line":1226},"line",1,[1223,1228,1230],{"class":1229},"s7zQu","import",[1223,1232,1234],{"class":1233},"sMK4o"," {",[1223,1236,1238],{"class":1237},"sTEyZ"," createNoydb",[1223,1240,1241],{"class":1233},",",[1223,1243,1244],{"class":1237}," withSearch",[1223,1246,1247],{"class":1233}," }",[1223,1249,1250],{"class":1229}," from",[1223,1252,1253],{"class":1233}," '",[1223,1255,1257],{"class":1256},"sfazB","@noy-db\u002Fhub",[1223,1259,1260],{"class":1233},"'\n",[1223,1262,1264],{"class":1225,"line":1263},2,[1223,1265,1267],{"emptyLinePlaceholder":1266},true,"\n",[1223,1269,1271,1275,1278,1281,1284,1287,1290],{"class":1225,"line":1270},3,[1223,1272,1274],{"class":1273},"spNyl","const",[1223,1276,1277],{"class":1237}," db ",[1223,1279,1280],{"class":1233},"=",[1223,1282,1283],{"class":1229}," await",[1223,1285,1238],{"class":1286},"s2Zo4",[1223,1288,1289],{"class":1237},"(",[1223,1291,1292],{"class":1233},"{\n",[1223,1294,1296,1300,1302,1304,1307,1310],{"class":1225,"line":1295},4,[1223,1297,1299],{"class":1298},"swJcz","  user",[1223,1301,1172],{"class":1233},[1223,1303,1253],{"class":1233},[1223,1305,1306],{"class":1256},"alice",[1223,1308,1309],{"class":1233},"'",[1223,1311,1312],{"class":1233},",\n",[1223,1314,1316,1319,1321,1323,1326,1328],{"class":1225,"line":1315},5,[1223,1317,1318],{"class":1298},"  secret",[1223,1320,1172],{"class":1233},[1223,1322,1253],{"class":1233},[1223,1324,1325],{"class":1256},"alice-secret-2026",[1223,1327,1309],{"class":1233},[1223,1329,1312],{"class":1233},[1223,1331,1333,1336,1338,1340,1343],{"class":1225,"line":1332},6,[1223,1334,1335],{"class":1298},"  searchStrategy",[1223,1337,1172],{"class":1233},[1223,1339,1244],{"class":1286},[1223,1341,1342],{"class":1237},"()",[1223,1344,1312],{"class":1233},[1223,1346,1348,1351],{"class":1225,"line":1347},7,[1223,1349,1350],{"class":1233},"}",[1223,1352,1353],{"class":1237},")\n",[1223,1355,1357,1359,1362,1364,1366,1369,1371,1374,1376,1378,1381,1383],{"class":1225,"line":1356},8,[1223,1358,1274],{"class":1273},[1223,1360,1361],{"class":1237}," vault ",[1223,1363,1280],{"class":1233},[1223,1365,1283],{"class":1229},[1223,1367,1368],{"class":1237}," db",[1223,1370,1085],{"class":1233},[1223,1372,1373],{"class":1286},"openVault",[1223,1375,1289],{"class":1237},[1223,1377,1309],{"class":1233},[1223,1379,1380],{"class":1256},"books",[1223,1382,1309],{"class":1233},[1223,1384,1353],{"class":1237},[1223,1386,1388],{"class":1225,"line":1387},9,[1223,1389,1267],{"emptyLinePlaceholder":1266},[1223,1391,1393,1396,1400,1402,1405,1407,1410,1413,1416,1418,1420],{"class":1225,"line":1392},10,[1223,1394,1395],{"class":1273},"interface",[1223,1397,1399],{"class":1398},"sBMFI"," Doc",[1223,1401,1234],{"class":1233},[1223,1403,1404],{"class":1298}," id",[1223,1406,1172],{"class":1233},[1223,1408,1409],{"class":1398}," string",[1223,1411,1412],{"class":1233},";",[1223,1414,1415],{"class":1298}," text",[1223,1417,1172],{"class":1233},[1223,1419,1409],{"class":1398},[1223,1421,1422],{"class":1233}," }\n",[1223,1424,1426],{"class":1225,"line":1425},11,[1223,1427,1267],{"emptyLinePlaceholder":1266},[1223,1429,1431,1433,1436,1438,1441,1443,1446,1449,1452,1455,1457,1459,1462,1464,1466],{"class":1225,"line":1430},12,[1223,1432,1274],{"class":1273},[1223,1434,1435],{"class":1237}," docs ",[1223,1437,1280],{"class":1233},[1223,1439,1440],{"class":1237}," vault",[1223,1442,1085],{"class":1233},[1223,1444,1445],{"class":1286},"collection",[1223,1447,1448],{"class":1233},"\u003C",[1223,1450,1451],{"class":1398},"Doc",[1223,1453,1454],{"class":1233},">",[1223,1456,1289],{"class":1237},[1223,1458,1309],{"class":1233},[1223,1460,1461],{"class":1256},"docs",[1223,1463,1309],{"class":1233},[1223,1465,1241],{"class":1233},[1223,1467,1468],{"class":1233}," {\n",[1223,1470,1472,1475,1477],{"class":1225,"line":1471},13,[1223,1473,1474],{"class":1298},"  embeddings",[1223,1476,1172],{"class":1233},[1223,1478,1468],{"class":1233},[1223,1480,1482,1485,1487,1489,1492,1494,1496],{"class":1225,"line":1481},14,[1223,1483,1484],{"class":1298},"    source",[1223,1486,1172],{"class":1233},[1223,1488,1253],{"class":1233},[1223,1490,1491],{"class":1256},"text",[1223,1493,1309],{"class":1233},[1223,1495,1241],{"class":1233},[1223,1497,1499],{"class":1498},"sHwdD","                                 \u002F\u002F field path(s) to embed\n",[1223,1501,1503,1506,1508,1511,1514,1517,1520,1523,1526,1529,1531],{"class":1225,"line":1502},15,[1223,1504,1505],{"class":1286},"    encode",[1223,1507,1172],{"class":1233},[1223,1509,1510],{"class":1273}," async",[1223,1512,1513],{"class":1233}," (",[1223,1515,1491],{"class":1516},"sHdIc",[1223,1518,1519],{"class":1233},")",[1223,1521,1522],{"class":1273}," =>",[1223,1524,1525],{"class":1286}," myEmbeddingApi",[1223,1527,1528],{"class":1237},"(text)",[1223,1530,1241],{"class":1233},[1223,1532,1533],{"class":1498},"    \u002F\u002F your encoder — see \"Supplying an encode function\" below\n",[1223,1535,1537,1540,1542,1546,1548],{"class":1225,"line":1536},16,[1223,1538,1539],{"class":1298},"    dim",[1223,1541,1172],{"class":1233},[1223,1543,1545],{"class":1544},"sbssI"," 1536",[1223,1547,1241],{"class":1233},[1223,1549,1550],{"class":1498},"                                       \u002F\u002F expected vector length\n",[1223,1552,1554,1557,1559,1561,1564,1566,1568],{"class":1225,"line":1553},17,[1223,1555,1556],{"class":1298},"    model",[1223,1558,1172],{"class":1233},[1223,1560,1253],{"class":1233},[1223,1562,1563],{"class":1256},"text-embedding-3-small",[1223,1565,1309],{"class":1233},[1223,1567,1241],{"class":1233},[1223,1569,1570],{"class":1498},"                 \u002F\u002F version tag, checked on every retrieval\n",[1223,1572,1574],{"class":1225,"line":1573},18,[1223,1575,1576],{"class":1233},"  },\n",[1223,1578,1580,1582],{"class":1225,"line":1579},19,[1223,1581,1350],{"class":1233},[1223,1583,1353],{"class":1237},[1090,1585,1586,1592,1597,1609,1620],{},[1093,1587,1588,1591],{},[961,1589,1590],{},"source"," is a field path or array of field paths; values are joined with a space before encoding.",[1093,1593,1594,1596],{},[961,1595,1111],{}," is async; if it throws, the write that triggered it fails.",[1093,1598,1599,1601,1602,1605,1606,1085],{},[961,1600,1154],{}," is enforced on every write — an ",[961,1603,1604],{},"encode()"," result of the wrong length throws ",[961,1607,1608],{},"EmbeddingDimMismatchError",[1093,1610,1611,1614,1615,1155,1617,1619],{},[952,1612,1613],{},"CRDT collections are unsupported",": declaring both ",[961,1616,976],{},[961,1618,653],{}," on the same collection throws immediately. Use a non-CRDT collection for semantic search.",[1093,1621,1622],{},"A record whose source field is blank or missing yields a near-zero vector — it is stored and retrievable but scores low on every query.",[1624,1625,1627,1628,1630],"h3",{"id":1626},"supplying-an-encode-function","Supplying an ",[961,1629,1111],{}," function",[946,1632,1635],{"color":1633,"icon":1634},"info","i-lucide-sparkles",[942,1636,1637,1643,1644,1646,1647,1650,1651,1653],{},[952,1638,1639,1640,1642],{},"Why ",[961,1641,1111],{}," is a strategic seam."," An embedding is how modern AI turns ",[970,1645,972],{}," into numbers: a model trained on vast amounts of text maps each string to a point in vector space where \"payment past due\" lands near \"overdue invoice\". Embedding quality is one of the fastest-moving parts of AI — so noy-db bundles ",[952,1648,1649],{},"no"," model and makes ",[961,1652,1111],{}," a hook you own. You can drop in a better model the day it ships, match cost, latency, and quality to your app, and (by running it on-device) get AI-grade semantic search without giving up zero-knowledge. The database stays a small, model-agnostic vector store; the intelligence is yours to choose and upgrade.",[942,1655,1656,1657,1659,1660,1662,1663,1666,1667,1669,1670,1155,1672,1674,1675,1677,1678,1681,1682,1685],{},"In practice, ",[961,1658,1111],{}," receives the record's ",[961,1661,1590],{}," text and must return a ",[961,1664,1665],{},"Float32Array"," of length ",[961,1668,1154],{},"; set the collection's ",[961,1671,1154],{},[961,1673,1158],{}," to match the encoder you pick (each tab notes both). The one zero-knowledge caveat: whatever you call inside ",[961,1676,1111],{}," sees your text as ",[952,1679,1680],{},"plaintext",", so an ",[952,1683,1684],{},"on-device"," encoder keeps the guarantee end-to-end, while a hosted API adds that provider as a party that can read your data.",[1687,1688,1689,1876,2140,2382],"code-group",{},[1214,1690,1693],{"className":1216,"code":1691,"filename":1692,"language":1218,"meta":1219,"style":1219},"\u002F\u002F On-device, nothing leaves the machine — the zero-knowledge-preserving choice.\nimport { pipeline } from '@xenova\u002Ftransformers'\n\nconst extractor = await pipeline('feature-extraction', 'Xenova\u002Fall-MiniLM-L6-v2')\n\nasync function myEmbeddingApi(text: string): Promise\u003CFloat32Array> {\n  const out = await extractor(text, { pooling: 'mean', normalize: true })\n  return new Float32Array(out.data)\n}\n\u002F\u002F collection config → dim: 384, model: 'all-MiniLM-L6-v2'\n","Local · Transformers.js",[961,1694,1695,1700,1720,1724,1757,1761,1792,1843,1866,1871],{"__ignoreMap":1219},[1223,1696,1697],{"class":1225,"line":1226},[1223,1698,1699],{"class":1498},"\u002F\u002F On-device, nothing leaves the machine — the zero-knowledge-preserving choice.\n",[1223,1701,1702,1704,1706,1709,1711,1713,1715,1718],{"class":1225,"line":1263},[1223,1703,1230],{"class":1229},[1223,1705,1234],{"class":1233},[1223,1707,1708],{"class":1237}," pipeline",[1223,1710,1247],{"class":1233},[1223,1712,1250],{"class":1229},[1223,1714,1253],{"class":1233},[1223,1716,1717],{"class":1256},"@xenova\u002Ftransformers",[1223,1719,1260],{"class":1233},[1223,1721,1722],{"class":1225,"line":1270},[1223,1723,1267],{"emptyLinePlaceholder":1266},[1223,1725,1726,1728,1731,1733,1735,1737,1739,1741,1744,1746,1748,1750,1753,1755],{"class":1225,"line":1295},[1223,1727,1274],{"class":1273},[1223,1729,1730],{"class":1237}," extractor ",[1223,1732,1280],{"class":1233},[1223,1734,1283],{"class":1229},[1223,1736,1708],{"class":1286},[1223,1738,1289],{"class":1237},[1223,1740,1309],{"class":1233},[1223,1742,1743],{"class":1256},"feature-extraction",[1223,1745,1309],{"class":1233},[1223,1747,1241],{"class":1233},[1223,1749,1253],{"class":1233},[1223,1751,1752],{"class":1256},"Xenova\u002Fall-MiniLM-L6-v2",[1223,1754,1309],{"class":1233},[1223,1756,1353],{"class":1237},[1223,1758,1759],{"class":1225,"line":1315},[1223,1760,1267],{"emptyLinePlaceholder":1266},[1223,1762,1763,1766,1768,1770,1772,1774,1776,1778,1781,1784,1786,1788,1790],{"class":1225,"line":1332},[1223,1764,1765],{"class":1273},"async",[1223,1767,1630],{"class":1273},[1223,1769,1525],{"class":1286},[1223,1771,1289],{"class":1233},[1223,1773,1491],{"class":1516},[1223,1775,1172],{"class":1233},[1223,1777,1409],{"class":1398},[1223,1779,1780],{"class":1233},"):",[1223,1782,1783],{"class":1398}," Promise",[1223,1785,1448],{"class":1233},[1223,1787,1665],{"class":1398},[1223,1789,1454],{"class":1233},[1223,1791,1468],{"class":1233},[1223,1793,1794,1797,1800,1803,1805,1808,1810,1812,1814,1816,1819,1821,1823,1826,1828,1830,1833,1835,1839,1841],{"class":1225,"line":1347},[1223,1795,1796],{"class":1273},"  const",[1223,1798,1799],{"class":1237}," out",[1223,1801,1802],{"class":1233}," =",[1223,1804,1283],{"class":1229},[1223,1806,1807],{"class":1286}," extractor",[1223,1809,1289],{"class":1298},[1223,1811,1491],{"class":1237},[1223,1813,1241],{"class":1233},[1223,1815,1234],{"class":1233},[1223,1817,1818],{"class":1298}," pooling",[1223,1820,1172],{"class":1233},[1223,1822,1253],{"class":1233},[1223,1824,1825],{"class":1256},"mean",[1223,1827,1309],{"class":1233},[1223,1829,1241],{"class":1233},[1223,1831,1832],{"class":1298}," normalize",[1223,1834,1172],{"class":1233},[1223,1836,1838],{"class":1837},"sfNiH"," true",[1223,1840,1247],{"class":1233},[1223,1842,1353],{"class":1298},[1223,1844,1845,1848,1851,1854,1856,1859,1861,1864],{"class":1225,"line":1356},[1223,1846,1847],{"class":1229},"  return",[1223,1849,1850],{"class":1233}," new",[1223,1852,1853],{"class":1286}," Float32Array",[1223,1855,1289],{"class":1298},[1223,1857,1858],{"class":1237},"out",[1223,1860,1085],{"class":1233},[1223,1862,1863],{"class":1237},"data",[1223,1865,1353],{"class":1298},[1223,1867,1868],{"class":1225,"line":1387},[1223,1869,1870],{"class":1233},"}\n",[1223,1872,1873],{"class":1225,"line":1392},[1223,1874,1875],{"class":1498},"\u002F\u002F collection config → dim: 384, model: 'all-MiniLM-L6-v2'\n",[1214,1877,1880],{"className":1216,"code":1878,"filename":1879,"language":1218,"meta":1219,"style":1219},"\u002F\u002F Hosted API — sees your text in plaintext. Matches the dim\u002Fmodel in the config above.\nasync function myEmbeddingApi(text: string): Promise\u003CFloat32Array> {\n  const res = await fetch('https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fembeddings', {\n    method: 'POST',\n    headers: {\n      Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,\n      'Content-Type': 'application\u002Fjson',\n    },\n    body: JSON.stringify({ model: 'text-embedding-3-small', input: text }),\n  })\n  const { data } = await res.json()\n  return new Float32Array(data[0].embedding)\n}\n\u002F\u002F collection config → dim: 1536, model: 'text-embedding-3-small'\n","OpenAI",[961,1881,1882,1887,1915,1942,1958,1967,2000,2021,2026,2072,2079,2103,2131,2135],{"__ignoreMap":1219},[1223,1883,1884],{"class":1225,"line":1226},[1223,1885,1886],{"class":1498},"\u002F\u002F Hosted API — sees your text in plaintext. Matches the dim\u002Fmodel in the config above.\n",[1223,1888,1889,1891,1893,1895,1897,1899,1901,1903,1905,1907,1909,1911,1913],{"class":1225,"line":1263},[1223,1890,1765],{"class":1273},[1223,1892,1630],{"class":1273},[1223,1894,1525],{"class":1286},[1223,1896,1289],{"class":1233},[1223,1898,1491],{"class":1516},[1223,1900,1172],{"class":1233},[1223,1902,1409],{"class":1398},[1223,1904,1780],{"class":1233},[1223,1906,1783],{"class":1398},[1223,1908,1448],{"class":1233},[1223,1910,1665],{"class":1398},[1223,1912,1454],{"class":1233},[1223,1914,1468],{"class":1233},[1223,1916,1917,1919,1922,1924,1926,1929,1931,1933,1936,1938,1940],{"class":1225,"line":1270},[1223,1918,1796],{"class":1273},[1223,1920,1921],{"class":1237}," res",[1223,1923,1802],{"class":1233},[1223,1925,1283],{"class":1229},[1223,1927,1928],{"class":1286}," fetch",[1223,1930,1289],{"class":1298},[1223,1932,1309],{"class":1233},[1223,1934,1935],{"class":1256},"https:\u002F\u002Fapi.openai.com\u002Fv1\u002Fembeddings",[1223,1937,1309],{"class":1233},[1223,1939,1241],{"class":1233},[1223,1941,1468],{"class":1233},[1223,1943,1944,1947,1949,1951,1954,1956],{"class":1225,"line":1295},[1223,1945,1946],{"class":1298},"    method",[1223,1948,1172],{"class":1233},[1223,1950,1253],{"class":1233},[1223,1952,1953],{"class":1256},"POST",[1223,1955,1309],{"class":1233},[1223,1957,1312],{"class":1233},[1223,1959,1960,1963,1965],{"class":1225,"line":1315},[1223,1961,1962],{"class":1298},"    headers",[1223,1964,1172],{"class":1233},[1223,1966,1468],{"class":1233},[1223,1968,1969,1972,1974,1977,1980,1983,1986,1988,1990,1992,1995,1998],{"class":1225,"line":1332},[1223,1970,1971],{"class":1298},"      Authorization",[1223,1973,1172],{"class":1233},[1223,1975,1976],{"class":1233}," `",[1223,1978,1979],{"class":1256},"Bearer ",[1223,1981,1982],{"class":1233},"${",[1223,1984,1985],{"class":1237},"process",[1223,1987,1085],{"class":1233},[1223,1989,183],{"class":1237},[1223,1991,1085],{"class":1233},[1223,1993,1994],{"class":1237},"OPENAI_API_KEY",[1223,1996,1997],{"class":1233},"}`",[1223,1999,1312],{"class":1233},[1223,2001,2002,2005,2008,2010,2012,2014,2017,2019],{"class":1225,"line":1347},[1223,2003,2004],{"class":1233},"      '",[1223,2006,2007],{"class":1298},"Content-Type",[1223,2009,1309],{"class":1233},[1223,2011,1172],{"class":1233},[1223,2013,1253],{"class":1233},[1223,2015,2016],{"class":1256},"application\u002Fjson",[1223,2018,1309],{"class":1233},[1223,2020,1312],{"class":1233},[1223,2022,2023],{"class":1225,"line":1356},[1223,2024,2025],{"class":1233},"    },\n",[1223,2027,2028,2031,2033,2036,2038,2041,2043,2046,2049,2051,2053,2055,2057,2059,2062,2064,2066,2068,2070],{"class":1225,"line":1387},[1223,2029,2030],{"class":1298},"    body",[1223,2032,1172],{"class":1233},[1223,2034,2035],{"class":1237}," JSON",[1223,2037,1085],{"class":1233},[1223,2039,2040],{"class":1286},"stringify",[1223,2042,1289],{"class":1298},[1223,2044,2045],{"class":1233},"{",[1223,2047,2048],{"class":1298}," model",[1223,2050,1172],{"class":1233},[1223,2052,1253],{"class":1233},[1223,2054,1563],{"class":1256},[1223,2056,1309],{"class":1233},[1223,2058,1241],{"class":1233},[1223,2060,2061],{"class":1298}," input",[1223,2063,1172],{"class":1233},[1223,2065,1415],{"class":1237},[1223,2067,1247],{"class":1233},[1223,2069,1519],{"class":1298},[1223,2071,1312],{"class":1233},[1223,2073,2074,2077],{"class":1225,"line":1392},[1223,2075,2076],{"class":1233},"  }",[1223,2078,1353],{"class":1298},[1223,2080,2081,2083,2085,2088,2090,2092,2094,2096,2098,2100],{"class":1225,"line":1425},[1223,2082,1796],{"class":1273},[1223,2084,1234],{"class":1233},[1223,2086,2087],{"class":1237}," data",[1223,2089,1247],{"class":1233},[1223,2091,1802],{"class":1233},[1223,2093,1283],{"class":1229},[1223,2095,1921],{"class":1237},[1223,2097,1085],{"class":1233},[1223,2099,141],{"class":1286},[1223,2101,2102],{"class":1298},"()\n",[1223,2104,2105,2107,2109,2111,2113,2115,2118,2121,2124,2126,2129],{"class":1225,"line":1430},[1223,2106,1847],{"class":1229},[1223,2108,1850],{"class":1233},[1223,2110,1853],{"class":1286},[1223,2112,1289],{"class":1298},[1223,2114,1863],{"class":1237},[1223,2116,2117],{"class":1298},"[",[1223,2119,2120],{"class":1544},"0",[1223,2122,2123],{"class":1298},"]",[1223,2125,1085],{"class":1233},[1223,2127,2128],{"class":1237},"embedding",[1223,2130,1353],{"class":1298},[1223,2132,2133],{"class":1225,"line":1471},[1223,2134,1870],{"class":1233},[1223,2136,2137],{"class":1225,"line":1481},[1223,2138,2139],{"class":1498},"\u002F\u002F collection config → dim: 1536, model: 'text-embedding-3-small'\n",[1214,2141,2144],{"className":1216,"code":2142,"filename":2143,"language":1218,"meta":1219,"style":1219},"\u002F\u002F Anthropic ships no embeddings endpoint — Claude is generative-only. Its\n\u002F\u002F recommended embeddings provider is Voyage AI. Hosted, so it sees plaintext.\nasync function myEmbeddingApi(text: string): Promise\u003CFloat32Array> {\n  const res = await fetch('https:\u002F\u002Fapi.voyageai.com\u002Fv1\u002Fembeddings', {\n    method: 'POST',\n    headers: {\n      Authorization: `Bearer ${process.env.VOYAGE_API_KEY}`,\n      'Content-Type': 'application\u002Fjson',\n    },\n    body: JSON.stringify({ model: 'voyage-3', input: text }),\n  })\n  const { data } = await res.json()\n  return new Float32Array(data[0].embedding)\n}\n\u002F\u002F collection config → dim: 1024, model: 'voyage-3'\n","Anthropic → Voyage",[961,2145,2146,2151,2156,2184,2209,2223,2231,2258,2276,2280,2321,2327,2349,2373,2377],{"__ignoreMap":1219},[1223,2147,2148],{"class":1225,"line":1226},[1223,2149,2150],{"class":1498},"\u002F\u002F Anthropic ships no embeddings endpoint — Claude is generative-only. Its\n",[1223,2152,2153],{"class":1225,"line":1263},[1223,2154,2155],{"class":1498},"\u002F\u002F recommended embeddings provider is Voyage AI. Hosted, so it sees plaintext.\n",[1223,2157,2158,2160,2162,2164,2166,2168,2170,2172,2174,2176,2178,2180,2182],{"class":1225,"line":1270},[1223,2159,1765],{"class":1273},[1223,2161,1630],{"class":1273},[1223,2163,1525],{"class":1286},[1223,2165,1289],{"class":1233},[1223,2167,1491],{"class":1516},[1223,2169,1172],{"class":1233},[1223,2171,1409],{"class":1398},[1223,2173,1780],{"class":1233},[1223,2175,1783],{"class":1398},[1223,2177,1448],{"class":1233},[1223,2179,1665],{"class":1398},[1223,2181,1454],{"class":1233},[1223,2183,1468],{"class":1233},[1223,2185,2186,2188,2190,2192,2194,2196,2198,2200,2203,2205,2207],{"class":1225,"line":1295},[1223,2187,1796],{"class":1273},[1223,2189,1921],{"class":1237},[1223,2191,1802],{"class":1233},[1223,2193,1283],{"class":1229},[1223,2195,1928],{"class":1286},[1223,2197,1289],{"class":1298},[1223,2199,1309],{"class":1233},[1223,2201,2202],{"class":1256},"https:\u002F\u002Fapi.voyageai.com\u002Fv1\u002Fembeddings",[1223,2204,1309],{"class":1233},[1223,2206,1241],{"class":1233},[1223,2208,1468],{"class":1233},[1223,2210,2211,2213,2215,2217,2219,2221],{"class":1225,"line":1315},[1223,2212,1946],{"class":1298},[1223,2214,1172],{"class":1233},[1223,2216,1253],{"class":1233},[1223,2218,1953],{"class":1256},[1223,2220,1309],{"class":1233},[1223,2222,1312],{"class":1233},[1223,2224,2225,2227,2229],{"class":1225,"line":1332},[1223,2226,1962],{"class":1298},[1223,2228,1172],{"class":1233},[1223,2230,1468],{"class":1233},[1223,2232,2233,2235,2237,2239,2241,2243,2245,2247,2249,2251,2254,2256],{"class":1225,"line":1347},[1223,2234,1971],{"class":1298},[1223,2236,1172],{"class":1233},[1223,2238,1976],{"class":1233},[1223,2240,1979],{"class":1256},[1223,2242,1982],{"class":1233},[1223,2244,1985],{"class":1237},[1223,2246,1085],{"class":1233},[1223,2248,183],{"class":1237},[1223,2250,1085],{"class":1233},[1223,2252,2253],{"class":1237},"VOYAGE_API_KEY",[1223,2255,1997],{"class":1233},[1223,2257,1312],{"class":1233},[1223,2259,2260,2262,2264,2266,2268,2270,2272,2274],{"class":1225,"line":1356},[1223,2261,2004],{"class":1233},[1223,2263,2007],{"class":1298},[1223,2265,1309],{"class":1233},[1223,2267,1172],{"class":1233},[1223,2269,1253],{"class":1233},[1223,2271,2016],{"class":1256},[1223,2273,1309],{"class":1233},[1223,2275,1312],{"class":1233},[1223,2277,2278],{"class":1225,"line":1387},[1223,2279,2025],{"class":1233},[1223,2281,2282,2284,2286,2288,2290,2292,2294,2296,2298,2300,2302,2305,2307,2309,2311,2313,2315,2317,2319],{"class":1225,"line":1392},[1223,2283,2030],{"class":1298},[1223,2285,1172],{"class":1233},[1223,2287,2035],{"class":1237},[1223,2289,1085],{"class":1233},[1223,2291,2040],{"class":1286},[1223,2293,1289],{"class":1298},[1223,2295,2045],{"class":1233},[1223,2297,2048],{"class":1298},[1223,2299,1172],{"class":1233},[1223,2301,1253],{"class":1233},[1223,2303,2304],{"class":1256},"voyage-3",[1223,2306,1309],{"class":1233},[1223,2308,1241],{"class":1233},[1223,2310,2061],{"class":1298},[1223,2312,1172],{"class":1233},[1223,2314,1415],{"class":1237},[1223,2316,1247],{"class":1233},[1223,2318,1519],{"class":1298},[1223,2320,1312],{"class":1233},[1223,2322,2323,2325],{"class":1225,"line":1425},[1223,2324,2076],{"class":1233},[1223,2326,1353],{"class":1298},[1223,2328,2329,2331,2333,2335,2337,2339,2341,2343,2345,2347],{"class":1225,"line":1430},[1223,2330,1796],{"class":1273},[1223,2332,1234],{"class":1233},[1223,2334,2087],{"class":1237},[1223,2336,1247],{"class":1233},[1223,2338,1802],{"class":1233},[1223,2340,1283],{"class":1229},[1223,2342,1921],{"class":1237},[1223,2344,1085],{"class":1233},[1223,2346,141],{"class":1286},[1223,2348,2102],{"class":1298},[1223,2350,2351,2353,2355,2357,2359,2361,2363,2365,2367,2369,2371],{"class":1225,"line":1471},[1223,2352,1847],{"class":1229},[1223,2354,1850],{"class":1233},[1223,2356,1853],{"class":1286},[1223,2358,1289],{"class":1298},[1223,2360,1863],{"class":1237},[1223,2362,2117],{"class":1298},[1223,2364,2120],{"class":1544},[1223,2366,2123],{"class":1298},[1223,2368,1085],{"class":1233},[1223,2370,2128],{"class":1237},[1223,2372,1353],{"class":1298},[1223,2374,2375],{"class":1225,"line":1481},[1223,2376,1870],{"class":1233},[1223,2378,2379],{"class":1225,"line":1502},[1223,2380,2381],{"class":1498},"\u002F\u002F collection config → dim: 1024, model: 'voyage-3'\n",[1214,2383,2386],{"className":1216,"code":2384,"filename":2385,"language":1218,"meta":1219,"style":1219},"\u002F\u002F A local Ollama server — on-device, larger models than run in-browser.\nasync function myEmbeddingApi(text: string): Promise\u003CFloat32Array> {\n  const res = await fetch('http:\u002F\u002Flocalhost:11434\u002Fapi\u002Fembeddings', {\n    method: 'POST',\n    body: JSON.stringify({ model: 'nomic-embed-text', prompt: text }),\n  })\n  const { embedding } = await res.json()\n  return new Float32Array(embedding)\n}\n\u002F\u002F collection config → dim: 768, model: 'nomic-embed-text'\n","Local · Ollama",[961,2387,2388,2393,2421,2446,2460,2502,2508,2531,2545,2549],{"__ignoreMap":1219},[1223,2389,2390],{"class":1225,"line":1226},[1223,2391,2392],{"class":1498},"\u002F\u002F A local Ollama server — on-device, larger models than run in-browser.\n",[1223,2394,2395,2397,2399,2401,2403,2405,2407,2409,2411,2413,2415,2417,2419],{"class":1225,"line":1263},[1223,2396,1765],{"class":1273},[1223,2398,1630],{"class":1273},[1223,2400,1525],{"class":1286},[1223,2402,1289],{"class":1233},[1223,2404,1491],{"class":1516},[1223,2406,1172],{"class":1233},[1223,2408,1409],{"class":1398},[1223,2410,1780],{"class":1233},[1223,2412,1783],{"class":1398},[1223,2414,1448],{"class":1233},[1223,2416,1665],{"class":1398},[1223,2418,1454],{"class":1233},[1223,2420,1468],{"class":1233},[1223,2422,2423,2425,2427,2429,2431,2433,2435,2437,2440,2442,2444],{"class":1225,"line":1270},[1223,2424,1796],{"class":1273},[1223,2426,1921],{"class":1237},[1223,2428,1802],{"class":1233},[1223,2430,1283],{"class":1229},[1223,2432,1928],{"class":1286},[1223,2434,1289],{"class":1298},[1223,2436,1309],{"class":1233},[1223,2438,2439],{"class":1256},"http:\u002F\u002Flocalhost:11434\u002Fapi\u002Fembeddings",[1223,2441,1309],{"class":1233},[1223,2443,1241],{"class":1233},[1223,2445,1468],{"class":1233},[1223,2447,2448,2450,2452,2454,2456,2458],{"class":1225,"line":1295},[1223,2449,1946],{"class":1298},[1223,2451,1172],{"class":1233},[1223,2453,1253],{"class":1233},[1223,2455,1953],{"class":1256},[1223,2457,1309],{"class":1233},[1223,2459,1312],{"class":1233},[1223,2461,2462,2464,2466,2468,2470,2472,2474,2476,2478,2480,2482,2485,2487,2489,2492,2494,2496,2498,2500],{"class":1225,"line":1315},[1223,2463,2030],{"class":1298},[1223,2465,1172],{"class":1233},[1223,2467,2035],{"class":1237},[1223,2469,1085],{"class":1233},[1223,2471,2040],{"class":1286},[1223,2473,1289],{"class":1298},[1223,2475,2045],{"class":1233},[1223,2477,2048],{"class":1298},[1223,2479,1172],{"class":1233},[1223,2481,1253],{"class":1233},[1223,2483,2484],{"class":1256},"nomic-embed-text",[1223,2486,1309],{"class":1233},[1223,2488,1241],{"class":1233},[1223,2490,2491],{"class":1298}," prompt",[1223,2493,1172],{"class":1233},[1223,2495,1415],{"class":1237},[1223,2497,1247],{"class":1233},[1223,2499,1519],{"class":1298},[1223,2501,1312],{"class":1233},[1223,2503,2504,2506],{"class":1225,"line":1332},[1223,2505,2076],{"class":1233},[1223,2507,1353],{"class":1298},[1223,2509,2510,2512,2514,2517,2519,2521,2523,2525,2527,2529],{"class":1225,"line":1347},[1223,2511,1796],{"class":1273},[1223,2513,1234],{"class":1233},[1223,2515,2516],{"class":1237}," embedding",[1223,2518,1247],{"class":1233},[1223,2520,1802],{"class":1233},[1223,2522,1283],{"class":1229},[1223,2524,1921],{"class":1237},[1223,2526,1085],{"class":1233},[1223,2528,141],{"class":1286},[1223,2530,2102],{"class":1298},[1223,2532,2533,2535,2537,2539,2541,2543],{"class":1225,"line":1356},[1223,2534,1847],{"class":1229},[1223,2536,1850],{"class":1233},[1223,2538,1853],{"class":1286},[1223,2540,1289],{"class":1298},[1223,2542,2128],{"class":1237},[1223,2544,1353],{"class":1298},[1223,2546,2547],{"class":1225,"line":1387},[1223,2548,1870],{"class":1233},[1223,2550,2551],{"class":1225,"line":1392},[1223,2552,2553],{"class":1498},"\u002F\u002F collection config → dim: 768, model: 'nomic-embed-text'\n",[942,2555,2556,2557,2559,2560,2563,2564,2567,2568,2571],{},"Without ",[961,2558,1137],{},", every method below (",[961,2561,2562],{},"retrieve",", ",[961,2565,2566],{},"similarTo",", and the write-time embedding compute) throws ",[961,2569,2570],{},"SearchNotEnabledError"," telling you to opt in.",[998,2573,2575],{"id":2574},"usage","Usage",[1624,2577,2579,2580],{"id":2578},"semantic-retrieval-retrievequery-mode-semantic","Semantic retrieval — ",[961,2581,2582],{},"retrieve(query, { mode: 'semantic' })",[1214,2584,2586],{"className":1216,"code":2585,"language":1218,"meta":1219,"style":1219},"const hits = await docs.retrieve('overdue invoice', { mode: 'semantic' })\n",[961,2587,2588],{"__ignoreMap":1219},[1223,2589,2590,2592,2595,2597,2599,2602,2604,2606,2608,2610,2613,2615,2617,2619,2622,2624,2626,2629,2631,2633],{"class":1225,"line":1226},[1223,2591,1274],{"class":1273},[1223,2593,2594],{"class":1237}," hits ",[1223,2596,1280],{"class":1233},[1223,2598,1283],{"class":1229},[1223,2600,2601],{"class":1237}," docs",[1223,2603,1085],{"class":1233},[1223,2605,2562],{"class":1286},[1223,2607,1289],{"class":1237},[1223,2609,1309],{"class":1233},[1223,2611,2612],{"class":1256},"overdue invoice",[1223,2614,1309],{"class":1233},[1223,2616,1241],{"class":1233},[1223,2618,1234],{"class":1233},[1223,2620,2621],{"class":1298}," mode",[1223,2623,1172],{"class":1233},[1223,2625,1253],{"class":1233},[1223,2627,2628],{"class":1256},"semantic",[1223,2630,1309],{"class":1233},[1223,2632,1247],{"class":1233},[1223,2634,1353],{"class":1237},[1214,2636,2639],{"className":2637,"code":2638,"language":141,"meta":1219,"style":1219},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[\n  { \"id\": \"inv-0231\", \"score\": 0.912, \"rank\": 1, \"field\": \"(vector)\", \"snippet\": \"\" },\n  { \"id\": \"inv-0198\", \"score\": 0.887, \"rank\": 2, \"field\": \"(vector)\", \"snippet\": \"\" },\n  { \"id\": \"inv-0104\", \"score\": 0.845, \"rank\": 3, \"field\": \"(vector)\", \"snippet\": \"\" }\n]\n",[961,2640,2641,2646,2732,2807,2882],{"__ignoreMap":1219},[1223,2642,2643],{"class":1225,"line":1226},[1223,2644,2645],{"class":1233},"[\n",[1223,2647,2648,2651,2654,2657,2660,2662,2664,2667,2669,2671,2673,2676,2678,2680,2683,2685,2687,2690,2692,2694,2697,2699,2701,2704,2706,2708,2710,2713,2715,2717,2719,2722,2724,2726,2729],{"class":1225,"line":1263},[1223,2649,2650],{"class":1233},"  {",[1223,2652,2653],{"class":1233}," \"",[1223,2655,2656],{"class":1273},"id",[1223,2658,2659],{"class":1233},"\"",[1223,2661,1172],{"class":1233},[1223,2663,2653],{"class":1233},[1223,2665,2666],{"class":1256},"inv-0231",[1223,2668,2659],{"class":1233},[1223,2670,1241],{"class":1233},[1223,2672,2653],{"class":1233},[1223,2674,2675],{"class":1273},"score",[1223,2677,2659],{"class":1233},[1223,2679,1172],{"class":1233},[1223,2681,2682],{"class":1544}," 0.912",[1223,2684,1241],{"class":1233},[1223,2686,2653],{"class":1233},[1223,2688,2689],{"class":1273},"rank",[1223,2691,2659],{"class":1233},[1223,2693,1172],{"class":1233},[1223,2695,2696],{"class":1544}," 1",[1223,2698,1241],{"class":1233},[1223,2700,2653],{"class":1233},[1223,2702,2703],{"class":1273},"field",[1223,2705,2659],{"class":1233},[1223,2707,1172],{"class":1233},[1223,2709,2653],{"class":1233},[1223,2711,2712],{"class":1256},"(vector)",[1223,2714,2659],{"class":1233},[1223,2716,1241],{"class":1233},[1223,2718,2653],{"class":1233},[1223,2720,2721],{"class":1273},"snippet",[1223,2723,2659],{"class":1233},[1223,2725,1172],{"class":1233},[1223,2727,2728],{"class":1233}," \"\"",[1223,2730,2731],{"class":1233}," },\n",[1223,2733,2734,2736,2738,2740,2742,2744,2746,2749,2751,2753,2755,2757,2759,2761,2764,2766,2768,2770,2772,2774,2777,2779,2781,2783,2785,2787,2789,2791,2793,2795,2797,2799,2801,2803,2805],{"class":1225,"line":1270},[1223,2735,2650],{"class":1233},[1223,2737,2653],{"class":1233},[1223,2739,2656],{"class":1273},[1223,2741,2659],{"class":1233},[1223,2743,1172],{"class":1233},[1223,2745,2653],{"class":1233},[1223,2747,2748],{"class":1256},"inv-0198",[1223,2750,2659],{"class":1233},[1223,2752,1241],{"class":1233},[1223,2754,2653],{"class":1233},[1223,2756,2675],{"class":1273},[1223,2758,2659],{"class":1233},[1223,2760,1172],{"class":1233},[1223,2762,2763],{"class":1544}," 0.887",[1223,2765,1241],{"class":1233},[1223,2767,2653],{"class":1233},[1223,2769,2689],{"class":1273},[1223,2771,2659],{"class":1233},[1223,2773,1172],{"class":1233},[1223,2775,2776],{"class":1544}," 2",[1223,2778,1241],{"class":1233},[1223,2780,2653],{"class":1233},[1223,2782,2703],{"class":1273},[1223,2784,2659],{"class":1233},[1223,2786,1172],{"class":1233},[1223,2788,2653],{"class":1233},[1223,2790,2712],{"class":1256},[1223,2792,2659],{"class":1233},[1223,2794,1241],{"class":1233},[1223,2796,2653],{"class":1233},[1223,2798,2721],{"class":1273},[1223,2800,2659],{"class":1233},[1223,2802,1172],{"class":1233},[1223,2804,2728],{"class":1233},[1223,2806,2731],{"class":1233},[1223,2808,2809,2811,2813,2815,2817,2819,2821,2824,2826,2828,2830,2832,2834,2836,2839,2841,2843,2845,2847,2849,2852,2854,2856,2858,2860,2862,2864,2866,2868,2870,2872,2874,2876,2878,2880],{"class":1225,"line":1295},[1223,2810,2650],{"class":1233},[1223,2812,2653],{"class":1233},[1223,2814,2656],{"class":1273},[1223,2816,2659],{"class":1233},[1223,2818,1172],{"class":1233},[1223,2820,2653],{"class":1233},[1223,2822,2823],{"class":1256},"inv-0104",[1223,2825,2659],{"class":1233},[1223,2827,1241],{"class":1233},[1223,2829,2653],{"class":1233},[1223,2831,2675],{"class":1273},[1223,2833,2659],{"class":1233},[1223,2835,1172],{"class":1233},[1223,2837,2838],{"class":1544}," 0.845",[1223,2840,1241],{"class":1233},[1223,2842,2653],{"class":1233},[1223,2844,2689],{"class":1273},[1223,2846,2659],{"class":1233},[1223,2848,1172],{"class":1233},[1223,2850,2851],{"class":1544}," 3",[1223,2853,1241],{"class":1233},[1223,2855,2653],{"class":1233},[1223,2857,2703],{"class":1273},[1223,2859,2659],{"class":1233},[1223,2861,1172],{"class":1233},[1223,2863,2653],{"class":1233},[1223,2865,2712],{"class":1256},[1223,2867,2659],{"class":1233},[1223,2869,1241],{"class":1233},[1223,2871,2653],{"class":1233},[1223,2873,2721],{"class":1273},[1223,2875,2659],{"class":1233},[1223,2877,1172],{"class":1233},[1223,2879,2728],{"class":1233},[1223,2881,1422],{"class":1233},[1223,2883,2884],{"class":1225,"line":1315},[1223,2885,2886],{"class":1233},"]\n",[942,2888,2889,2891,2892,2894,2895,2898],{},[961,2890,2675],{}," is cosine similarity (higher is closer). ",[961,2893,2703],{}," is always the literal string ",[961,2896,2897],{},"'(vector)'"," for a semantic hit — there's no matched field span to report, unlike a lexical hit. Options:",[1214,2900,2902],{"className":1216,"code":2901,"language":1218,"meta":1219,"style":1219},"\u002F\u002F Limit to top 5 (defaults to 10 when omitted):\nconst top5 = await docs.retrieve('overdue invoice', { mode: 'semantic', limit: 5 })\n\u002F\u002F → same shape as the `hits` array above, truncated to at most 5 entries\n\n\u002F\u002F Only hits above a cosine-similarity floor:\nconst strong = await docs.retrieve('quarterly report', { mode: 'semantic', minScore: 0.8 })\n",[961,2903,2904,2909,2962,2967,2971,2976],{"__ignoreMap":1219},[1223,2905,2906],{"class":1225,"line":1226},[1223,2907,2908],{"class":1498},"\u002F\u002F Limit to top 5 (defaults to 10 when omitted):\n",[1223,2910,2911,2913,2916,2918,2920,2922,2924,2926,2928,2930,2932,2934,2936,2938,2940,2942,2944,2946,2948,2950,2953,2955,2958,2960],{"class":1225,"line":1263},[1223,2912,1274],{"class":1273},[1223,2914,2915],{"class":1237}," top5 ",[1223,2917,1280],{"class":1233},[1223,2919,1283],{"class":1229},[1223,2921,2601],{"class":1237},[1223,2923,1085],{"class":1233},[1223,2925,2562],{"class":1286},[1223,2927,1289],{"class":1237},[1223,2929,1309],{"class":1233},[1223,2931,2612],{"class":1256},[1223,2933,1309],{"class":1233},[1223,2935,1241],{"class":1233},[1223,2937,1234],{"class":1233},[1223,2939,2621],{"class":1298},[1223,2941,1172],{"class":1233},[1223,2943,1253],{"class":1233},[1223,2945,2628],{"class":1256},[1223,2947,1309],{"class":1233},[1223,2949,1241],{"class":1233},[1223,2951,2952],{"class":1298}," limit",[1223,2954,1172],{"class":1233},[1223,2956,2957],{"class":1544}," 5",[1223,2959,1247],{"class":1233},[1223,2961,1353],{"class":1237},[1223,2963,2964],{"class":1225,"line":1270},[1223,2965,2966],{"class":1498},"\u002F\u002F → same shape as the `hits` array above, truncated to at most 5 entries\n",[1223,2968,2969],{"class":1225,"line":1295},[1223,2970,1267],{"emptyLinePlaceholder":1266},[1223,2972,2973],{"class":1225,"line":1315},[1223,2974,2975],{"class":1498},"\u002F\u002F Only hits above a cosine-similarity floor:\n",[1223,2977,2978,2980,2983,2985,2987,2989,2991,2993,2995,2997,3000,3002,3004,3006,3008,3010,3012,3014,3016,3018,3021,3023,3026,3028],{"class":1225,"line":1332},[1223,2979,1274],{"class":1273},[1223,2981,2982],{"class":1237}," strong ",[1223,2984,1280],{"class":1233},[1223,2986,1283],{"class":1229},[1223,2988,2601],{"class":1237},[1223,2990,1085],{"class":1233},[1223,2992,2562],{"class":1286},[1223,2994,1289],{"class":1237},[1223,2996,1309],{"class":1233},[1223,2998,2999],{"class":1256},"quarterly report",[1223,3001,1309],{"class":1233},[1223,3003,1241],{"class":1233},[1223,3005,1234],{"class":1233},[1223,3007,2621],{"class":1298},[1223,3009,1172],{"class":1233},[1223,3011,1253],{"class":1233},[1223,3013,2628],{"class":1256},[1223,3015,1309],{"class":1233},[1223,3017,1241],{"class":1233},[1223,3019,3020],{"class":1298}," minScore",[1223,3022,1172],{"class":1233},[1223,3024,3025],{"class":1544}," 0.8",[1223,3027,1247],{"class":1233},[1223,3029,1353],{"class":1237},[1214,3031,3033],{"className":2637,"code":3032,"language":141,"meta":1219,"style":1219},"[\n  { \"id\": \"rpt-Q2-2026\", \"score\": 0.913, \"rank\": 1, \"field\": \"(vector)\", \"snippet\": \"\" }\n]\n",[961,3034,3035,3039,3113],{"__ignoreMap":1219},[1223,3036,3037],{"class":1225,"line":1226},[1223,3038,2645],{"class":1233},[1223,3040,3041,3043,3045,3047,3049,3051,3053,3056,3058,3060,3062,3064,3066,3068,3071,3073,3075,3077,3079,3081,3083,3085,3087,3089,3091,3093,3095,3097,3099,3101,3103,3105,3107,3109,3111],{"class":1225,"line":1263},[1223,3042,2650],{"class":1233},[1223,3044,2653],{"class":1233},[1223,3046,2656],{"class":1273},[1223,3048,2659],{"class":1233},[1223,3050,1172],{"class":1233},[1223,3052,2653],{"class":1233},[1223,3054,3055],{"class":1256},"rpt-Q2-2026",[1223,3057,2659],{"class":1233},[1223,3059,1241],{"class":1233},[1223,3061,2653],{"class":1233},[1223,3063,2675],{"class":1273},[1223,3065,2659],{"class":1233},[1223,3067,1172],{"class":1233},[1223,3069,3070],{"class":1544}," 0.913",[1223,3072,1241],{"class":1233},[1223,3074,2653],{"class":1233},[1223,3076,2689],{"class":1273},[1223,3078,2659],{"class":1233},[1223,3080,1172],{"class":1233},[1223,3082,2696],{"class":1544},[1223,3084,1241],{"class":1233},[1223,3086,2653],{"class":1233},[1223,3088,2703],{"class":1273},[1223,3090,2659],{"class":1233},[1223,3092,1172],{"class":1233},[1223,3094,2653],{"class":1233},[1223,3096,2712],{"class":1256},[1223,3098,2659],{"class":1233},[1223,3100,1241],{"class":1233},[1223,3102,2653],{"class":1233},[1223,3104,2721],{"class":1273},[1223,3106,2659],{"class":1233},[1223,3108,1172],{"class":1233},[1223,3110,2728],{"class":1233},[1223,3112,1422],{"class":1233},[1223,3114,3115],{"class":1225,"line":1270},[1223,3116,2886],{"class":1233},[942,3118,3119,3120,3123,3124,3126],{},"Hits with ",[961,3121,3122],{},"score \u003C 0.8"," are dropped entirely, not just ranked lower — that's why ",[961,3125,952],{}," can come back shorter than an unfiltered call even when more records exist.",[1624,3128,3130,3133],{"id":3129},"retrievehitt-shape",[961,3131,3132],{},"RetrieveHit\u003CT>"," shape",[1214,3135,3137],{"className":1216,"code":3136,"language":1218,"meta":1219,"style":1219},"interface RetrieveHit\u003CT> {\n  readonly id: string\n  readonly score: number    \u002F\u002F cosine similarity for semantic hits; RRF score for hybrid hits (see below)\n  readonly rank: number     \u002F\u002F 1-based\n  readonly field: string    \u002F\u002F '(vector)' for a semantic-only hit\n  readonly snippet: string  \u002F\u002F '' for a semantic-only hit — there's no text span to extract\n  readonly locale?: string  \u002F\u002F set only on lexical hits sourced from an i18n\u002FdictKey field\n  readonly record?: T       \u002F\u002F present only when includeRecord: true\n}\n",[961,3138,3139,3155,3167,3182,3196,3210,3224,3239,3254],{"__ignoreMap":1219},[1223,3140,3141,3143,3146,3148,3151,3153],{"class":1225,"line":1226},[1223,3142,1395],{"class":1273},[1223,3144,3145],{"class":1398}," RetrieveHit",[1223,3147,1448],{"class":1233},[1223,3149,3150],{"class":1398},"T",[1223,3152,1454],{"class":1233},[1223,3154,1468],{"class":1233},[1223,3156,3157,3160,3162,3164],{"class":1225,"line":1263},[1223,3158,3159],{"class":1273},"  readonly",[1223,3161,1404],{"class":1298},[1223,3163,1172],{"class":1233},[1223,3165,3166],{"class":1398}," string\n",[1223,3168,3169,3171,3174,3176,3179],{"class":1225,"line":1270},[1223,3170,3159],{"class":1273},[1223,3172,3173],{"class":1298}," score",[1223,3175,1172],{"class":1233},[1223,3177,3178],{"class":1398}," number",[1223,3180,3181],{"class":1498},"    \u002F\u002F cosine similarity for semantic hits; RRF score for hybrid hits (see below)\n",[1223,3183,3184,3186,3189,3191,3193],{"class":1225,"line":1295},[1223,3185,3159],{"class":1273},[1223,3187,3188],{"class":1298}," rank",[1223,3190,1172],{"class":1233},[1223,3192,3178],{"class":1398},[1223,3194,3195],{"class":1498},"     \u002F\u002F 1-based\n",[1223,3197,3198,3200,3203,3205,3207],{"class":1225,"line":1315},[1223,3199,3159],{"class":1273},[1223,3201,3202],{"class":1298}," field",[1223,3204,1172],{"class":1233},[1223,3206,1409],{"class":1398},[1223,3208,3209],{"class":1498},"    \u002F\u002F '(vector)' for a semantic-only hit\n",[1223,3211,3212,3214,3217,3219,3221],{"class":1225,"line":1332},[1223,3213,3159],{"class":1273},[1223,3215,3216],{"class":1298}," snippet",[1223,3218,1172],{"class":1233},[1223,3220,1409],{"class":1398},[1223,3222,3223],{"class":1498},"  \u002F\u002F '' for a semantic-only hit — there's no text span to extract\n",[1223,3225,3226,3228,3231,3234,3236],{"class":1225,"line":1347},[1223,3227,3159],{"class":1273},[1223,3229,3230],{"class":1298}," locale",[1223,3232,3233],{"class":1233},"?:",[1223,3235,1409],{"class":1398},[1223,3237,3238],{"class":1498},"  \u002F\u002F set only on lexical hits sourced from an i18n\u002FdictKey field\n",[1223,3240,3241,3243,3246,3248,3251],{"class":1225,"line":1356},[1223,3242,3159],{"class":1273},[1223,3244,3245],{"class":1298}," record",[1223,3247,3233],{"class":1233},[1223,3249,3250],{"class":1398}," T",[1223,3252,3253],{"class":1498},"       \u002F\u002F present only when includeRecord: true\n",[1223,3255,3256],{"class":1225,"line":1387},[1223,3257,1870],{"class":1233},[1624,3259,3261,3264],{"id":3260},"collectionsimilartovector-opts-bring-your-own-vector",[961,3262,3263],{},"collection.similarTo(vector, opts?)"," — bring your own vector",[942,3266,3267],{},"Use this when you've already encoded the query yourself (or you're comparing against a vector that didn't come from a text query at all).",[1214,3269,3271],{"className":1216,"code":3270,"language":1218,"meta":1219,"style":1219},"const qVec = await myEncoder('quarterly report')\nconst hits = await docs.similarTo(qVec, { k: 10 })\n",[961,3272,3273,3297],{"__ignoreMap":1219},[1223,3274,3275,3277,3280,3282,3284,3287,3289,3291,3293,3295],{"class":1225,"line":1226},[1223,3276,1274],{"class":1273},[1223,3278,3279],{"class":1237}," qVec ",[1223,3281,1280],{"class":1233},[1223,3283,1283],{"class":1229},[1223,3285,3286],{"class":1286}," myEncoder",[1223,3288,1289],{"class":1237},[1223,3290,1309],{"class":1233},[1223,3292,2999],{"class":1256},[1223,3294,1309],{"class":1233},[1223,3296,1353],{"class":1237},[1223,3298,3299,3301,3303,3305,3307,3309,3311,3313,3316,3318,3320,3323,3325,3328,3330],{"class":1225,"line":1263},[1223,3300,1274],{"class":1273},[1223,3302,2594],{"class":1237},[1223,3304,1280],{"class":1233},[1223,3306,1283],{"class":1229},[1223,3308,2601],{"class":1237},[1223,3310,1085],{"class":1233},[1223,3312,2566],{"class":1286},[1223,3314,3315],{"class":1237},"(qVec",[1223,3317,1241],{"class":1233},[1223,3319,1234],{"class":1233},[1223,3321,3322],{"class":1298}," k",[1223,3324,1172],{"class":1233},[1223,3326,3327],{"class":1544}," 10",[1223,3329,1247],{"class":1233},[1223,3331,1353],{"class":1237},[1214,3333,3335],{"className":2637,"code":3334,"language":141,"meta":1219,"style":1219},"[\n  { \"id\": \"rep-Q1\", \"score\": 0.934, \"rank\": 1, \"field\": \"(vector)\", \"snippet\": \"\" },\n  { \"id\": \"rep-Q4-prior\", \"score\": 0.79, \"rank\": 2, \"field\": \"(vector)\", \"snippet\": \"\" }\n]\n",[961,3336,3337,3341,3415,3489],{"__ignoreMap":1219},[1223,3338,3339],{"class":1225,"line":1226},[1223,3340,2645],{"class":1233},[1223,3342,3343,3345,3347,3349,3351,3353,3355,3358,3360,3362,3364,3366,3368,3370,3373,3375,3377,3379,3381,3383,3385,3387,3389,3391,3393,3395,3397,3399,3401,3403,3405,3407,3409,3411,3413],{"class":1225,"line":1263},[1223,3344,2650],{"class":1233},[1223,3346,2653],{"class":1233},[1223,3348,2656],{"class":1273},[1223,3350,2659],{"class":1233},[1223,3352,1172],{"class":1233},[1223,3354,2653],{"class":1233},[1223,3356,3357],{"class":1256},"rep-Q1",[1223,3359,2659],{"class":1233},[1223,3361,1241],{"class":1233},[1223,3363,2653],{"class":1233},[1223,3365,2675],{"class":1273},[1223,3367,2659],{"class":1233},[1223,3369,1172],{"class":1233},[1223,3371,3372],{"class":1544}," 0.934",[1223,3374,1241],{"class":1233},[1223,3376,2653],{"class":1233},[1223,3378,2689],{"class":1273},[1223,3380,2659],{"class":1233},[1223,3382,1172],{"class":1233},[1223,3384,2696],{"class":1544},[1223,3386,1241],{"class":1233},[1223,3388,2653],{"class":1233},[1223,3390,2703],{"class":1273},[1223,3392,2659],{"class":1233},[1223,3394,1172],{"class":1233},[1223,3396,2653],{"class":1233},[1223,3398,2712],{"class":1256},[1223,3400,2659],{"class":1233},[1223,3402,1241],{"class":1233},[1223,3404,2653],{"class":1233},[1223,3406,2721],{"class":1273},[1223,3408,2659],{"class":1233},[1223,3410,1172],{"class":1233},[1223,3412,2728],{"class":1233},[1223,3414,2731],{"class":1233},[1223,3416,3417,3419,3421,3423,3425,3427,3429,3432,3434,3436,3438,3440,3442,3444,3447,3449,3451,3453,3455,3457,3459,3461,3463,3465,3467,3469,3471,3473,3475,3477,3479,3481,3483,3485,3487],{"class":1225,"line":1270},[1223,3418,2650],{"class":1233},[1223,3420,2653],{"class":1233},[1223,3422,2656],{"class":1273},[1223,3424,2659],{"class":1233},[1223,3426,1172],{"class":1233},[1223,3428,2653],{"class":1233},[1223,3430,3431],{"class":1256},"rep-Q4-prior",[1223,3433,2659],{"class":1233},[1223,3435,1241],{"class":1233},[1223,3437,2653],{"class":1233},[1223,3439,2675],{"class":1273},[1223,3441,2659],{"class":1233},[1223,3443,1172],{"class":1233},[1223,3445,3446],{"class":1544}," 0.79",[1223,3448,1241],{"class":1233},[1223,3450,2653],{"class":1233},[1223,3452,2689],{"class":1273},[1223,3454,2659],{"class":1233},[1223,3456,1172],{"class":1233},[1223,3458,2776],{"class":1544},[1223,3460,1241],{"class":1233},[1223,3462,2653],{"class":1233},[1223,3464,2703],{"class":1273},[1223,3466,2659],{"class":1233},[1223,3468,1172],{"class":1233},[1223,3470,2653],{"class":1233},[1223,3472,2712],{"class":1256},[1223,3474,2659],{"class":1233},[1223,3476,1241],{"class":1233},[1223,3478,2653],{"class":1233},[1223,3480,2721],{"class":1273},[1223,3482,2659],{"class":1233},[1223,3484,1172],{"class":1233},[1223,3486,2728],{"class":1233},[1223,3488,1422],{"class":1233},[1223,3490,3491],{"class":1225,"line":1295},[1223,3492,2886],{"class":1233},[942,3494,3495,3496,3499,3500,3503,3504,2563,3507,1085],{},"Options: ",[961,3497,3498],{},"k"," (default ",[961,3501,3502],{},"10",", how many hits to return), ",[961,3505,3506],{},"minScore",[961,3508,3509],{},"includeRecord",[942,3511,3512,3515],{},[961,3513,3514],{},"query().similarTo().where()"," chaining — semantic search and a structured filter in one fluent expression — does not exist yet. Intersect two result sets manually instead:",[1214,3517,3519],{"className":1216,"code":3518,"language":1218,"meta":1219,"style":1219},"const vecHits = await docs.similarTo(qVec, { k: 20 })\nconst active = new Set((await docs.query().where('status', '==', 'active').run()).map((r) => r.id))\nconst filtered = vecHits.filter((h) => active.has(h.id))\n\u002F\u002F → the same RetrieveHit objects from vecHits, minus any whose id isn't in `active`;\n\u002F\u002F   rank\u002Fscore are left as similarTo() computed them, not re-numbered\n",[961,3520,3521,3555,3650,3693,3698],{"__ignoreMap":1219},[1223,3522,3523,3525,3528,3530,3532,3534,3536,3538,3540,3542,3544,3546,3548,3551,3553],{"class":1225,"line":1226},[1223,3524,1274],{"class":1273},[1223,3526,3527],{"class":1237}," vecHits ",[1223,3529,1280],{"class":1233},[1223,3531,1283],{"class":1229},[1223,3533,2601],{"class":1237},[1223,3535,1085],{"class":1233},[1223,3537,2566],{"class":1286},[1223,3539,3315],{"class":1237},[1223,3541,1241],{"class":1233},[1223,3543,1234],{"class":1233},[1223,3545,3322],{"class":1298},[1223,3547,1172],{"class":1233},[1223,3549,3550],{"class":1544}," 20",[1223,3552,1247],{"class":1233},[1223,3554,1353],{"class":1237},[1223,3556,3557,3559,3562,3564,3566,3569,3572,3575,3577,3579,3582,3584,3586,3589,3591,3593,3596,3598,3600,3602,3605,3607,3609,3611,3614,3616,3618,3620,3623,3626,3628,3631,3633,3635,3638,3640,3642,3645,3647],{"class":1225,"line":1263},[1223,3558,1274],{"class":1273},[1223,3560,3561],{"class":1237}," active ",[1223,3563,1280],{"class":1233},[1223,3565,1850],{"class":1233},[1223,3567,3568],{"class":1286}," Set",[1223,3570,3571],{"class":1237},"((",[1223,3573,3574],{"class":1229},"await",[1223,3576,2601],{"class":1237},[1223,3578,1085],{"class":1233},[1223,3580,3581],{"class":1286},"query",[1223,3583,1342],{"class":1237},[1223,3585,1085],{"class":1233},[1223,3587,3588],{"class":1286},"where",[1223,3590,1289],{"class":1237},[1223,3592,1309],{"class":1233},[1223,3594,3595],{"class":1256},"status",[1223,3597,1309],{"class":1233},[1223,3599,1241],{"class":1233},[1223,3601,1253],{"class":1233},[1223,3603,3604],{"class":1256},"==",[1223,3606,1309],{"class":1233},[1223,3608,1241],{"class":1233},[1223,3610,1253],{"class":1233},[1223,3612,3613],{"class":1256},"active",[1223,3615,1309],{"class":1233},[1223,3617,1519],{"class":1237},[1223,3619,1085],{"class":1233},[1223,3621,3622],{"class":1286},"run",[1223,3624,3625],{"class":1237},"())",[1223,3627,1085],{"class":1233},[1223,3629,3630],{"class":1286},"map",[1223,3632,1289],{"class":1237},[1223,3634,1289],{"class":1233},[1223,3636,3637],{"class":1516},"r",[1223,3639,1519],{"class":1233},[1223,3641,1522],{"class":1273},[1223,3643,3644],{"class":1237}," r",[1223,3646,1085],{"class":1233},[1223,3648,3649],{"class":1237},"id))\n",[1223,3651,3652,3654,3657,3659,3662,3664,3667,3669,3671,3674,3676,3678,3681,3683,3686,3689,3691],{"class":1225,"line":1270},[1223,3653,1274],{"class":1273},[1223,3655,3656],{"class":1237}," filtered ",[1223,3658,1280],{"class":1233},[1223,3660,3661],{"class":1237}," vecHits",[1223,3663,1085],{"class":1233},[1223,3665,3666],{"class":1286},"filter",[1223,3668,1289],{"class":1237},[1223,3670,1289],{"class":1233},[1223,3672,3673],{"class":1516},"h",[1223,3675,1519],{"class":1233},[1223,3677,1522],{"class":1273},[1223,3679,3680],{"class":1237}," active",[1223,3682,1085],{"class":1233},[1223,3684,3685],{"class":1286},"has",[1223,3687,3688],{"class":1237},"(h",[1223,3690,1085],{"class":1233},[1223,3692,3649],{"class":1237},[1223,3694,3695],{"class":1225,"line":1295},[1223,3696,3697],{"class":1498},"\u002F\u002F → the same RetrieveHit objects from vecHits, minus any whose id isn't in `active`;\n",[1223,3699,3700],{"class":1225,"line":1315},[1223,3701,3702],{"class":1498},"\u002F\u002F   rank\u002Fscore are left as similarTo() computed them, not re-numbered\n",[1624,3704,3706,3707],{"id":3705},"hybrid-retrieval-retrievequery-mode-hybrid","Hybrid retrieval — ",[961,3708,3709],{},"retrieve(query, { mode: 'hybrid' })",[942,3711,3712,3714,3715,3717,3718,3720,3721,3724,3725,3728,3729,3731,3732,3735],{},[961,3713,1171],{}," fuses the lexical ranking from ",[957,3716,1038],{"href":833},"'s ",[961,3719,995],{}," with the semantic ranking above, using ",[952,3722,3723],{},"Reciprocal Rank Fusion (RRF)",": run both rankings, then score each id by summing ",[961,3726,3727],{},"1 \u002F (k + rank)"," across every list it appears in (",[961,3730,3498],{}," defaults to ",[961,3733,3734],{},"60","), sort descending by that sum, and re-assign 1-based rank. A document that appears in both lists earns a contribution from each and typically outranks a document that only appears in one — even one that ranked higher within its own list. That's the benefit of hybrid retrieval: exact-token matches and semantic-proximity matches combine without needing to normalize BM25 scores against cosine scores.",[1214,3737,3739],{"className":1216,"code":3738,"language":1218,"meta":1219,"style":1219},"const hits = await docs.retrieve('overdue invoice', { mode: 'hybrid' })\n",[961,3740,3741],{"__ignoreMap":1219},[1223,3742,3743,3745,3747,3749,3751,3753,3755,3757,3759,3761,3763,3765,3767,3769,3771,3773,3775,3778,3780,3782],{"class":1225,"line":1226},[1223,3744,1274],{"class":1273},[1223,3746,2594],{"class":1237},[1223,3748,1280],{"class":1233},[1223,3750,1283],{"class":1229},[1223,3752,2601],{"class":1237},[1223,3754,1085],{"class":1233},[1223,3756,2562],{"class":1286},[1223,3758,1289],{"class":1237},[1223,3760,1309],{"class":1233},[1223,3762,2612],{"class":1256},[1223,3764,1309],{"class":1233},[1223,3766,1241],{"class":1233},[1223,3768,1234],{"class":1233},[1223,3770,2621],{"class":1298},[1223,3772,1172],{"class":1233},[1223,3774,1253],{"class":1233},[1223,3776,3777],{"class":1256},"hybrid",[1223,3779,1309],{"class":1233},[1223,3781,1247],{"class":1233},[1223,3783,1353],{"class":1237},[1214,3785,3787],{"className":2637,"code":3786,"language":141,"meta":1219,"style":1219},"[\n  { \"id\": \"inv-0231\", \"score\": 0.0328, \"rank\": 1, \"field\": \"title\", \"snippet\": \"…$4,200 overdue invoice for…\" },\n  { \"id\": \"inv-0104\", \"score\": 0.0164, \"rank\": 2, \"field\": \"(vector)\", \"snippet\": \"\" }\n]\n",[961,3788,3789,3793,3872,3945],{"__ignoreMap":1219},[1223,3790,3791],{"class":1225,"line":1226},[1223,3792,2645],{"class":1233},[1223,3794,3795,3797,3799,3801,3803,3805,3807,3809,3811,3813,3815,3817,3819,3821,3824,3826,3828,3830,3832,3834,3836,3838,3840,3842,3844,3846,3848,3851,3853,3855,3857,3859,3861,3863,3865,3868,3870],{"class":1225,"line":1263},[1223,3796,2650],{"class":1233},[1223,3798,2653],{"class":1233},[1223,3800,2656],{"class":1273},[1223,3802,2659],{"class":1233},[1223,3804,1172],{"class":1233},[1223,3806,2653],{"class":1233},[1223,3808,2666],{"class":1256},[1223,3810,2659],{"class":1233},[1223,3812,1241],{"class":1233},[1223,3814,2653],{"class":1233},[1223,3816,2675],{"class":1273},[1223,3818,2659],{"class":1233},[1223,3820,1172],{"class":1233},[1223,3822,3823],{"class":1544}," 0.0328",[1223,3825,1241],{"class":1233},[1223,3827,2653],{"class":1233},[1223,3829,2689],{"class":1273},[1223,3831,2659],{"class":1233},[1223,3833,1172],{"class":1233},[1223,3835,2696],{"class":1544},[1223,3837,1241],{"class":1233},[1223,3839,2653],{"class":1233},[1223,3841,2703],{"class":1273},[1223,3843,2659],{"class":1233},[1223,3845,1172],{"class":1233},[1223,3847,2653],{"class":1233},[1223,3849,3850],{"class":1256},"title",[1223,3852,2659],{"class":1233},[1223,3854,1241],{"class":1233},[1223,3856,2653],{"class":1233},[1223,3858,2721],{"class":1273},[1223,3860,2659],{"class":1233},[1223,3862,1172],{"class":1233},[1223,3864,2653],{"class":1233},[1223,3866,3867],{"class":1256},"…$4,200 overdue invoice for…",[1223,3869,2659],{"class":1233},[1223,3871,2731],{"class":1233},[1223,3873,3874,3876,3878,3880,3882,3884,3886,3888,3890,3892,3894,3896,3898,3900,3903,3905,3907,3909,3911,3913,3915,3917,3919,3921,3923,3925,3927,3929,3931,3933,3935,3937,3939,3941,3943],{"class":1225,"line":1270},[1223,3875,2650],{"class":1233},[1223,3877,2653],{"class":1233},[1223,3879,2656],{"class":1273},[1223,3881,2659],{"class":1233},[1223,3883,1172],{"class":1233},[1223,3885,2653],{"class":1233},[1223,3887,2823],{"class":1256},[1223,3889,2659],{"class":1233},[1223,3891,1241],{"class":1233},[1223,3893,2653],{"class":1233},[1223,3895,2675],{"class":1273},[1223,3897,2659],{"class":1233},[1223,3899,1172],{"class":1233},[1223,3901,3902],{"class":1544}," 0.0164",[1223,3904,1241],{"class":1233},[1223,3906,2653],{"class":1233},[1223,3908,2689],{"class":1273},[1223,3910,2659],{"class":1233},[1223,3912,1172],{"class":1233},[1223,3914,2776],{"class":1544},[1223,3916,1241],{"class":1233},[1223,3918,2653],{"class":1233},[1223,3920,2703],{"class":1273},[1223,3922,2659],{"class":1233},[1223,3924,1172],{"class":1233},[1223,3926,2653],{"class":1233},[1223,3928,2712],{"class":1256},[1223,3930,2659],{"class":1233},[1223,3932,1241],{"class":1233},[1223,3934,2653],{"class":1233},[1223,3936,2721],{"class":1273},[1223,3938,2659],{"class":1233},[1223,3940,1172],{"class":1233},[1223,3942,2728],{"class":1233},[1223,3944,1422],{"class":1233},[1223,3946,3947],{"class":1225,"line":1295},[1223,3948,2886],{"class":1233},[942,3950,3951,3953,3954,3957,3958,3960,3961,3960,3963,3966,3967,3969,3970,3973],{},[961,3952,2675],{}," here is the RRF score, not BM25 or cosine — with two fused lists it tops out at ",[961,3955,3956],{},"2\u002F61 ≈ 0.033",", so don't compare it to the scores from a plain lexical or semantic call. When the same id has a hit in both lists, the lexical hit's ",[961,3959,2703],{},"\u002F",[961,3962,2721],{},[961,3964,3965],{},"locale"," win (they're more informative than the ",[961,3968,2897],{}," placeholder); ",[961,3971,3972],{},"record"," is taken from whichever hit carries it.",[942,3975,3976,3977,3979,3980,3982],{},"Requires ",[961,3978,976],{}," configured on the collection — without it, ",[961,3981,3709],{}," throws. Hybrid retrieval adds no new store artifacts: it's pure in-memory computation over the lexical index, the vector set, and the eager cache, so it carries the same zero-knowledge guarantee as the lexical and semantic paths individually.",[1624,3984,3986,3988],{"id":3985},"within-retrieve-intersected-with-a-structured-query",[961,3987,1042],{}," — retrieve intersected with a structured query",[942,3990,3991,3993,3994,3996,3997,4000,4001,2563,4004,2563,4007,4010],{},[961,3992,1042],{}," intersects a ",[961,3995,995],{}," result with a ",[961,3998,3999],{},"collection.query().where(...)"," predicate, and works with every mode (",[961,4002,4003],{},"'lexical'",[961,4005,4006],{},"'semantic'",[961,4008,4009],{},"'hybrid'",").",[1214,4012,4014],{"className":1216,"code":4013,"language":1218,"meta":1219,"style":1219},"const hits = await docs.retrieve('overdue invoice', {\n  mode: 'hybrid',\n  within: docs.query().where('status', '==', 'open'),\n})\n",[961,4015,4016,4044,4059,4107],{"__ignoreMap":1219},[1223,4017,4018,4020,4022,4024,4026,4028,4030,4032,4034,4036,4038,4040,4042],{"class":1225,"line":1226},[1223,4019,1274],{"class":1273},[1223,4021,2594],{"class":1237},[1223,4023,1280],{"class":1233},[1223,4025,1283],{"class":1229},[1223,4027,2601],{"class":1237},[1223,4029,1085],{"class":1233},[1223,4031,2562],{"class":1286},[1223,4033,1289],{"class":1237},[1223,4035,1309],{"class":1233},[1223,4037,2612],{"class":1256},[1223,4039,1309],{"class":1233},[1223,4041,1241],{"class":1233},[1223,4043,1468],{"class":1233},[1223,4045,4046,4049,4051,4053,4055,4057],{"class":1225,"line":1263},[1223,4047,4048],{"class":1298},"  mode",[1223,4050,1172],{"class":1233},[1223,4052,1253],{"class":1233},[1223,4054,3777],{"class":1256},[1223,4056,1309],{"class":1233},[1223,4058,1312],{"class":1233},[1223,4060,4061,4064,4066,4068,4070,4072,4074,4076,4078,4080,4082,4084,4086,4088,4090,4092,4094,4096,4098,4101,4103,4105],{"class":1225,"line":1270},[1223,4062,4063],{"class":1298},"  within",[1223,4065,1172],{"class":1233},[1223,4067,2601],{"class":1237},[1223,4069,1085],{"class":1233},[1223,4071,3581],{"class":1286},[1223,4073,1342],{"class":1237},[1223,4075,1085],{"class":1233},[1223,4077,3588],{"class":1286},[1223,4079,1289],{"class":1237},[1223,4081,1309],{"class":1233},[1223,4083,3595],{"class":1256},[1223,4085,1309],{"class":1233},[1223,4087,1241],{"class":1233},[1223,4089,1253],{"class":1233},[1223,4091,3604],{"class":1256},[1223,4093,1309],{"class":1233},[1223,4095,1241],{"class":1233},[1223,4097,1253],{"class":1233},[1223,4099,4100],{"class":1256},"open",[1223,4102,1309],{"class":1233},[1223,4104,1519],{"class":1237},[1223,4106,1312],{"class":1233},[1223,4108,4109,4111],{"class":1225,"line":1295},[1223,4110,1350],{"class":1233},[1223,4112,1353],{"class":1237},[1214,4114,4116],{"className":2637,"code":4115,"language":141,"meta":1219,"style":1219},"[\n  { \"id\": \"inv-0231\", \"score\": 0.0328, \"rank\": 1, \"field\": \"title\", \"snippet\": \"…$4,200 overdue invoice for…\" }\n]\n",[961,4117,4118,4122,4198],{"__ignoreMap":1219},[1223,4119,4120],{"class":1225,"line":1226},[1223,4121,2645],{"class":1233},[1223,4123,4124,4126,4128,4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,4164,4166,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,4194,4196],{"class":1225,"line":1263},[1223,4125,2650],{"class":1233},[1223,4127,2653],{"class":1233},[1223,4129,2656],{"class":1273},[1223,4131,2659],{"class":1233},[1223,4133,1172],{"class":1233},[1223,4135,2653],{"class":1233},[1223,4137,2666],{"class":1256},[1223,4139,2659],{"class":1233},[1223,4141,1241],{"class":1233},[1223,4143,2653],{"class":1233},[1223,4145,2675],{"class":1273},[1223,4147,2659],{"class":1233},[1223,4149,1172],{"class":1233},[1223,4151,3823],{"class":1544},[1223,4153,1241],{"class":1233},[1223,4155,2653],{"class":1233},[1223,4157,2689],{"class":1273},[1223,4159,2659],{"class":1233},[1223,4161,1172],{"class":1233},[1223,4163,2696],{"class":1544},[1223,4165,1241],{"class":1233},[1223,4167,2653],{"class":1233},[1223,4169,2703],{"class":1273},[1223,4171,2659],{"class":1233},[1223,4173,1172],{"class":1233},[1223,4175,2653],{"class":1233},[1223,4177,3850],{"class":1256},[1223,4179,2659],{"class":1233},[1223,4181,1241],{"class":1233},[1223,4183,2653],{"class":1233},[1223,4185,2721],{"class":1273},[1223,4187,2659],{"class":1233},[1223,4189,1172],{"class":1233},[1223,4191,2653],{"class":1233},[1223,4193,3867],{"class":1256},[1223,4195,2659],{"class":1233},[1223,4197,1422],{"class":1233},[1223,4199,4200],{"class":1225,"line":1270},[1223,4201,2886],{"class":1233},[942,4203,4204,4206,4207,4209,4210,2563,4212,2563,4214,2563,4217,4220,4221,4224,4225,4228,4229,4231],{},[961,4205,1042],{}," matches ids by reference identity against the same in-memory snapshot ",[961,4208,995],{}," already reads — no extra store reads. It requires eager mode (the default). Supported query operators: ",[961,4211,3588],{},[961,4213,3666],{},[961,4215,4216],{},"and",[961,4218,4219],{},"or",", and projection ",[961,4222,4223],{},".join()",". ",[961,4226,4227],{},"crossJoin"," is unsupported inside ",[961,4230,1042],{}," (it produces new row objects that break id recovery) and throws a clear error if used.",[942,4233,4234,4237,4238,4241,4242,4244,4245,4248,4249,4251],{},[961,4235,4236],{},"limit"," is applied per-mode, ",[952,4239,4240],{},"before"," the ",[961,4243,1042],{}," intersection — so ",[961,4246,4247],{},"{ limit: 10, within }"," can return fewer than 10 hits even if more matching records exist beyond that cutoff. If the ",[961,4250,1042],{}," query matches nothing, the result is an empty array.",[1624,4253,4255,4258],{"id":4254},"fuseretrievallists-opts-the-fusion-primitive-standalone",[961,4256,4257],{},"fuseRetrieval(lists, opts?)"," — the fusion primitive standalone",[942,4260,4261,4264,4265,4268,4269,4272,4273,4275],{},[961,4262,4263],{},"retrieve({ mode: 'hybrid' })"," calls this internally with ",[961,4266,4267],{},"[lexicalHits, semanticHits]",", but it's also exported directly for merging any set of pre-ranked ",[961,4270,4271],{},"RetrieveHit"," lists — for example, combining ",[961,4274,995],{}," results from multiple vaults.",[1214,4277,4279],{"className":1216,"code":4278,"language":1218,"meta":1219,"style":1219},"import { fuseRetrieval } from '@noy-db\u002Fhub'\n\u002F\u002F also available from '@noy-db\u002Fhub\u002Fcargo'\n\nconst fused = fuseRetrieval([lexicalHits, semanticHits])\n\u002F\u002F → same shape as the mode: 'hybrid' result above — RRF-scored, re-ranked 1-based\n\nconst top5 = fuseRetrieval([listA, listB], { k: 60, limit: 5 })\n\u002F\u002F → up to 5 hits, sorted by descending RRF score\n",[961,4280,4281,4300,4305,4309,4328,4333,4337,4378],{"__ignoreMap":1219},[1223,4282,4283,4285,4287,4290,4292,4294,4296,4298],{"class":1225,"line":1226},[1223,4284,1230],{"class":1229},[1223,4286,1234],{"class":1233},[1223,4288,4289],{"class":1237}," fuseRetrieval",[1223,4291,1247],{"class":1233},[1223,4293,1250],{"class":1229},[1223,4295,1253],{"class":1233},[1223,4297,1257],{"class":1256},[1223,4299,1260],{"class":1233},[1223,4301,4302],{"class":1225,"line":1263},[1223,4303,4304],{"class":1498},"\u002F\u002F also available from '@noy-db\u002Fhub\u002Fcargo'\n",[1223,4306,4307],{"class":1225,"line":1270},[1223,4308,1267],{"emptyLinePlaceholder":1266},[1223,4310,4311,4313,4316,4318,4320,4323,4325],{"class":1225,"line":1295},[1223,4312,1274],{"class":1273},[1223,4314,4315],{"class":1237}," fused ",[1223,4317,1280],{"class":1233},[1223,4319,4289],{"class":1286},[1223,4321,4322],{"class":1237},"([lexicalHits",[1223,4324,1241],{"class":1233},[1223,4326,4327],{"class":1237}," semanticHits])\n",[1223,4329,4330],{"class":1225,"line":1315},[1223,4331,4332],{"class":1498},"\u002F\u002F → same shape as the mode: 'hybrid' result above — RRF-scored, re-ranked 1-based\n",[1223,4334,4335],{"class":1225,"line":1332},[1223,4336,1267],{"emptyLinePlaceholder":1266},[1223,4338,4339,4341,4343,4345,4347,4350,4352,4355,4357,4359,4361,4363,4366,4368,4370,4372,4374,4376],{"class":1225,"line":1347},[1223,4340,1274],{"class":1273},[1223,4342,2915],{"class":1237},[1223,4344,1280],{"class":1233},[1223,4346,4289],{"class":1286},[1223,4348,4349],{"class":1237},"([listA",[1223,4351,1241],{"class":1233},[1223,4353,4354],{"class":1237}," listB]",[1223,4356,1241],{"class":1233},[1223,4358,1234],{"class":1233},[1223,4360,3322],{"class":1298},[1223,4362,1172],{"class":1233},[1223,4364,4365],{"class":1544}," 60",[1223,4367,1241],{"class":1233},[1223,4369,2952],{"class":1298},[1223,4371,1172],{"class":1233},[1223,4373,2957],{"class":1544},[1223,4375,1247],{"class":1233},[1223,4377,1353],{"class":1237},[1223,4379,4380],{"class":1225,"line":1356},[1223,4381,4382],{"class":1498},"\u002F\u002F → up to 5 hits, sorted by descending RRF score\n",[942,4384,4385,4388],{},[961,4386,4387],{},"fuseRetrieval"," is pure — no I\u002FO, no store access — and arity-generic: it accepts two or more lists, so it works equally for fusing modalities (lexical + semantic) or fusing per-source result sets from an external caller.",[942,4390,4391],{},[952,4392,4393,1172],{},[961,4394,4395],{},"FuseOptions",[4397,4398,4399,4415],"table",{},[4400,4401,4402],"thead",{},[4403,4404,4405,4409,4412],"tr",{},[4406,4407,4408],"th",{},"Option",[4406,4410,4411],{},"Default",[4406,4413,4414],{},"Meaning",[4416,4417,4418,4434,4447],"tbody",{},[4403,4419,4420,4426,4431],{},[4421,4422,4423],"td",{},[961,4424,4425],{},"strategy",[4421,4427,4428],{},[961,4429,4430],{},"'rrf'",[4421,4432,4433],{},"The only supported strategy today",[4403,4435,4436,4440,4444],{},[4421,4437,4438],{},[961,4439,3498],{},[4421,4441,4442],{},[961,4443,3734],{},[4421,4445,4446],{},"RRF constant; larger flattens the rank weighting",[4403,4448,4449,4453,4456],{},[4421,4450,4451],{},[961,4452,4236],{},[4421,4454,4455],{},"—",[4421,4457,4458],{},"Truncate the fused output to the top N",[998,4460,4462],{"id":4461},"api-reference","API reference",[1624,4464,4466],{"id":4465},"embeddingdescriptor",[961,4467,4468],{},"EmbeddingDescriptor",[1214,4470,4472],{"className":1216,"code":4471,"language":1218,"meta":1219,"style":1219},"interface EmbeddingDescriptor {\n  readonly source: string | readonly string[]\n  readonly encode: (text: string) => Promise\u003CFloat32Array>\n  readonly dim: number\n  readonly model: string\n}\n",[961,4473,4474,4483,4505,4535,4547,4557],{"__ignoreMap":1219},[1223,4475,4476,4478,4481],{"class":1225,"line":1226},[1223,4477,1395],{"class":1273},[1223,4479,4480],{"class":1398}," EmbeddingDescriptor",[1223,4482,1468],{"class":1233},[1223,4484,4485,4487,4490,4492,4494,4497,4500,4502],{"class":1225,"line":1263},[1223,4486,3159],{"class":1273},[1223,4488,4489],{"class":1298}," source",[1223,4491,1172],{"class":1233},[1223,4493,1409],{"class":1398},[1223,4495,4496],{"class":1233}," |",[1223,4498,4499],{"class":1273}," readonly",[1223,4501,1409],{"class":1398},[1223,4503,4504],{"class":1237},"[]\n",[1223,4506,4507,4509,4512,4514,4516,4518,4520,4522,4524,4526,4528,4530,4532],{"class":1225,"line":1270},[1223,4508,3159],{"class":1273},[1223,4510,4511],{"class":1298}," encode",[1223,4513,1172],{"class":1233},[1223,4515,1513],{"class":1233},[1223,4517,1491],{"class":1516},[1223,4519,1172],{"class":1233},[1223,4521,1409],{"class":1398},[1223,4523,1519],{"class":1233},[1223,4525,1522],{"class":1273},[1223,4527,1783],{"class":1398},[1223,4529,1448],{"class":1233},[1223,4531,1665],{"class":1398},[1223,4533,4534],{"class":1233},">\n",[1223,4536,4537,4539,4542,4544],{"class":1225,"line":1295},[1223,4538,3159],{"class":1273},[1223,4540,4541],{"class":1298}," dim",[1223,4543,1172],{"class":1233},[1223,4545,4546],{"class":1398}," number\n",[1223,4548,4549,4551,4553,4555],{"class":1225,"line":1315},[1223,4550,3159],{"class":1273},[1223,4552,2048],{"class":1298},[1223,4554,1172],{"class":1233},[1223,4556,3166],{"class":1398},[1223,4558,4559],{"class":1225,"line":1332},[1223,4560,1870],{"class":1233},[942,4562,4563,4564,4566,4567,4010],{},"Passed as the ",[961,4565,976],{}," collection option (see ",[957,4568,1191],{"href":4569},"#opt-in",[1624,4571,4573],{"id":4572},"retrieveoptionst",[961,4574,4575],{},"RetrieveOptions\u003CT>",[4397,4577,4578,4589],{},[4400,4579,4580],{},[4403,4581,4582,4584,4587],{},[4406,4583,4408],{},[4406,4585,4586],{},"Type",[4406,4588,4414],{},[4416,4590,4591,4608,4622,4635,4649],{},[4403,4592,4593,4598,4603],{},[4421,4594,4595],{},[961,4596,4597],{},"mode",[4421,4599,4600],{},[961,4601,4602],{},"'lexical' | 'semantic' | 'hybrid'",[4421,4604,4605,4606],{},"Retrieval strategy; defaults to ",[961,4607,4003],{},[4403,4609,4610,4614,4619],{},[4421,4611,4612],{},[961,4613,4236],{},[4421,4615,4616],{},[961,4617,4618],{},"number",[4421,4620,4621],{},"Max hits to return",[4403,4623,4624,4628,4632],{},[4421,4625,4626],{},[961,4627,3506],{},[4421,4629,4630],{},[961,4631,4618],{},[4421,4633,4634],{},"Semantic-mode-only cosine floor",[4403,4636,4637,4641,4646],{},[4421,4638,4639],{},[961,4640,3509],{},[4421,4642,4643],{},[961,4644,4645],{},"boolean",[4421,4647,4648],{},"Attach the decrypted record to each hit",[4403,4650,4651,4655,4660],{},[4421,4652,4653],{},[961,4654,1042],{},[4421,4656,4657],{},[961,4658,4659],{},"Query\u003CT>",[4421,4661,4662],{},"Intersect hits with a structured query (see above)",[1624,4664,4666],{"id":4665},"collectionsimilartovector-opts",[961,4667,3263],{},[1214,4669,4671],{"className":1216,"code":4670,"language":1218,"meta":1219,"style":1219},"similarTo(vector: Float32Array, opts?: { k?: number; minScore?: number; includeRecord?: boolean }): Promise\u003CRetrieveHit\u003CT>[]>\n",[961,4672,4673],{"__ignoreMap":1219},[1223,4674,4675,4677,4680,4682,4685,4687,4689,4692,4694,4697,4699,4702,4704,4707,4709,4712,4715,4717,4719,4721,4723,4725,4728],{"class":1225,"line":1226},[1223,4676,2566],{"class":1286},[1223,4678,4679],{"class":1237},"(vector: Float32Array",[1223,4681,1241],{"class":1233},[1223,4683,4684],{"class":1237}," opts",[1223,4686,3233],{"class":1233},[1223,4688,1234],{"class":1233},[1223,4690,4691],{"class":1237}," k?",[1223,4693,1172],{"class":1233},[1223,4695,4696],{"class":1237}," number; minScore",[1223,4698,3233],{"class":1233},[1223,4700,4701],{"class":1237}," number; includeRecord",[1223,4703,3233],{"class":1233},[1223,4705,4706],{"class":1237}," boolean ",[1223,4708,1350],{"class":1233},[1223,4710,4711],{"class":1237},"): ",[1223,4713,4714],{"class":1398},"Promise",[1223,4716,1448],{"class":1233},[1223,4718,4271],{"class":1237},[1223,4720,1448],{"class":1233},[1223,4722,3150],{"class":1237},[1223,4724,1454],{"class":1233},[1223,4726,4727],{"class":1237},"[]",[1223,4729,4534],{"class":1233},[942,4731,4732,4733,3731,4735,1085],{},"Raw-vector kNN over the decrypted, in-memory vector set. ",[961,4734,3498],{},[961,4736,3502],{},[1624,4738,4740],{"id":4739},"collectionrebuildembeddings",[961,4741,4742],{},"collection.rebuildEmbeddings()",[1214,4744,4746],{"className":1216,"code":4745,"language":1218,"meta":1219,"style":1219},"rebuildEmbeddings(): Promise\u003C{ rebuilt: number; skipped: number }>\n",[961,4747,4748],{"__ignoreMap":1219},[1223,4749,4750,4753,4756,4758,4761,4764,4766,4768,4770,4773,4775,4777],{"class":1225,"line":1226},[1223,4751,4752],{"class":1286},"rebuildEmbeddings",[1223,4754,4755],{"class":1237},"(): ",[1223,4757,4714],{"class":1398},[1223,4759,4760],{"class":1233},"\u003C{",[1223,4762,4763],{"class":1398}," rebuilt",[1223,4765,1172],{"class":1233},[1223,4767,3178],{"class":1237},[1223,4769,1412],{"class":1233},[1223,4771,4772],{"class":1398}," skipped",[1223,4774,1172],{"class":1233},[1223,4776,3178],{"class":1237},[1223,4778,4779],{"class":1233}," }>\n",[942,4781,4782,4783,4785,4786,1085],{},"Force-re-derives every eligible record's ",[961,4784,1027],{}," sidecar in one idempotent, resumable pass. Skips\n(never refuses) elevated records, tombstones, and delete-markers. See\n",[957,4787,4789],{"href":4788},"#rebuilding-vectors-rebuildembeddings","Rebuilding vectors",[998,4791,4793],{"id":4792},"model-version-guard","Model-version guard",[942,4795,4796,4797,4799,4800,4802,4803,4805,4806,4809],{},"Every stored vector carries the ",[961,4798,1158],{}," string from the descriptor at the time it was written. On retrieval, if any stored vector's ",[961,4801,1158],{}," differs from the current descriptor's ",[961,4804,1158],{},", noy-db throws ",[961,4807,4808],{},"EmbeddingModelMismatchError"," — changing encoders silently would otherwise make cosine similarity meaningless across mismatched vector spaces.",[942,4811,4812,4813,4818,4819,4822,4823,4825,4826,4828],{},"Recovery: re-derive vectors across a whole collection in one pass with\n",[957,4814,4815],{"href":4788},[961,4816,4817],{},"rebuildEmbeddings()"," (below), or re-derive one at a time\nby re-putting the affected records (each ",[961,4820,4821],{},"put()"," triggers a fresh ",[961,4824,1604],{}," and a new ",[961,4827,1027],{},"\nwrite).",[998,4830,4832,4833],{"id":4831},"rebuilding-vectors-rebuildembeddings","Rebuilding vectors — ",[961,4834,4817],{},[942,4836,4837,4839,4840,4842,4843,4845,4846,4848,4849,4010],{},[961,4838,4742],{}," force-re-derives every eligible record's ",[961,4841,1027],{}," sidecar in one\npass, without waiting for organic writes. It walks every live record, calls your ",[961,4844,1604],{}," on each,\nand re-persists the sidecar. Introduced in ",[961,4847,1055],{}," (#788) as the opt-in bulk closer for the\nrecall gap the collection-namespacing change left open (see ",[957,4850,1081],{"href":1080},[1214,4852,4854],{"className":1216,"code":4853,"language":1218,"meta":1219,"style":1219},"const { rebuilt, skipped } = await docs.rebuildEmbeddings()\n\u002F\u002F → { rebuilt: 128, skipped: 3 }\n",[961,4855,4856,4883],{"__ignoreMap":1219},[1223,4857,4858,4860,4862,4864,4866,4869,4871,4873,4875,4877,4879,4881],{"class":1225,"line":1226},[1223,4859,1274],{"class":1273},[1223,4861,1234],{"class":1233},[1223,4863,4763],{"class":1237},[1223,4865,1241],{"class":1233},[1223,4867,4868],{"class":1237}," skipped ",[1223,4870,1350],{"class":1233},[1223,4872,1802],{"class":1233},[1223,4874,1283],{"class":1229},[1223,4876,2601],{"class":1237},[1223,4878,1085],{"class":1233},[1223,4880,4752],{"class":1286},[1223,4882,2102],{"class":1237},[1223,4884,4885],{"class":1225,"line":1263},[1223,4886,4887],{"class":1498},"\u002F\u002F → { rebuilt: 128, skipped: 3 }\n",[1090,4889,4890,4896,4920],{},[1093,4891,4892,4895],{},[952,4893,4894],{},"Opt-in and idempotent."," Each id's re-derive is independent, so it is safe to re-run: a partial\nfailure (e.g. a store error mid-walk) leaves the already-rebuilt sidecars in place, and re-running\ncompletes the rest.",[1093,4897,4898,4901,4902,4905,4906,4908,4909,4912,4913,4916,4917,1085],{},[952,4899,4900],{},"Elevated records are skipped, not refused."," A record elevated above tier 0 is ",[970,4903,4904],{},"supposed"," to\nhave no ",[961,4907,1027],{}," sidecar — re-deriving one would write searchable plaintext-derived data above\ntier 0 — so each elevated record is counted in ",[961,4910,4911],{},"skipped"," and the walk continues. Tombstones,\ndelete-marker rows, and a raw read racing a concurrent delete all decode to ",[961,4914,4915],{},"null"," and are\nlikewise skipped. This mirrors the tier-0 read gate described on\n",[957,4918,872],{"href":4919},"\u002Fservices\u002Ftiers#readwrite-gating",[1093,4921,4922,4925,4926,4928,4929,4932,4933,4935,4936,4938,4939,4941,4942,1085],{},[952,4923,4924],{},"Gated like every other search method."," A collection that never declared ",[961,4927,976],{}," returns\n",[961,4930,4931],{},"{ rebuilt: 0, skipped: 0 }"," without touching the strategy; a collection that declared\n",[961,4934,976],{}," but was created without ",[961,4937,1137],{}," throws ",[961,4940,2570],{},",\nmatching ",[961,4943,4821],{},[998,4945,4947],{"id":4946},"migrating-existing-vectors","Migrating existing vectors",[942,4949,4950,4951,4953,4954,4957,4958,4960,4961,4964],{},"The collection-namespacing change (",[961,4952,1055],{},", #726) has ",[952,4955,4956],{},"no dual-read fallback"," — a legacy\nbare-id ",[961,4959,1101],{}," row is irreducibly ambiguous about which collection it belongs to once ids\ncollide, so reading one would be unsound. Instead the change ",[952,4962,4963],{},"fails safe toward not-found",": a\nlegacy sidecar becomes unreachable ciphertext residue until its owning record is rewritten, never\nsurfacing under the wrong record.",[942,4966,4967,4968,4970,4971,4974],{},"If you populated embeddings before ",[961,4969,1055],{},", expect a ",[952,4972,4973],{},"recall gap"," for\nun-rewritten records until you close it one of two ways:",[1090,4976,4977,4990],{},[1093,4978,4979,4982,4983,4986,4987,4989],{},[952,4980,4981],{},"Organic self-heal."," ",[961,4984,4985],{},"embedOnWrite"," re-derives and re-persists the sidecar on every ",[961,4988,4821],{},", so\nany record written after upgrading heals for free — sidecars are a pure function of live plaintext\nplus model, always re-derivable.",[1093,4991,4992,4995,4996,5000],{},[952,4993,4994],{},"Bulk close."," Call ",[957,4997,4998],{"href":4788},[961,4999,4817],{}," once per\ncollection to re-derive every live record's sidecar immediately rather than waiting for writes.",[998,5002,5004,5007],{"id":5003},"forget-teardown",[961,5005,5006],{},"forget()"," teardown",[942,5009,5010,5013,5014,5016,5017,5020],{},[961,5011,5012],{},"vault.forget(subject)"," crypto-shreds matching records and also drops each affected record's ",[961,5015,1101],{}," side-car (best-effort, with any failures reported as residue on the returned ",[961,5018,5019],{},"ForgetResult",", the same pattern used for the lexical and structured indexes). The in-memory vector set is marked dirty so the next retrieval reloads from the store without the forgotten vectors. This matters because a vector can be inverted back toward its source text (embedding inversion), so it's treated as sensitive as the record itself and must not survive an erasure.",[998,5022,5024],{"id":5023},"limits-gotchas","Limits & gotchas",[4397,5026,5027,5037],{},[4400,5028,5029],{},[4403,5030,5031,5034],{},[4406,5032,5033],{},"Situation",[4406,5035,5036],{},"Behaviour",[4416,5038,5039,5051,5069,5083,5099,5111,5125,5138,5146,5160],{},[4403,5040,5041,5046],{},[4421,5042,5043,5045],{},[961,5044,1604],{}," returns the wrong length",[4421,5047,5048,5050],{},[961,5049,1608],{}," at write time",[4403,5052,5053,5061],{},[4421,5054,5055,5056,5058,5059],{},"Stored vector's ",[961,5057,1158],{}," ≠ descriptor's ",[961,5060,1158],{},[4421,5062,5063,5065,5066,5068],{},[961,5064,4808],{}," on retrieval; re-derive via ",[961,5067,4817],{}," or re-put affected records",[4403,5070,5071,5077],{},[4421,5072,5073,5074,5076],{},"Legacy bare-id ",[961,5075,1027],{}," sidecar after the namespacing change",[4421,5078,5079,5080,5082],{},"Unreachable residue (fails safe to not-found) until the record is rewritten or ",[961,5081,4817],{}," runs",[4403,5084,5085,5091],{},[4421,5086,5087,5088,5090],{},"Collection has no ",[961,5089,976],{}," config",[4421,5092,5093,1155,5095,5098],{},[961,5094,980],{},[961,5096,5097],{},"retrieve({ mode: 'semantic' })"," throw",[4403,5100,5101,5106],{},[4421,5102,5087,5103,5105],{},[961,5104,976],{}," config, hybrid mode",[4421,5107,5108,5110],{},[961,5109,4263],{}," throws",[4403,5112,5113,5120],{},[4421,5114,5115,5117,5118],{},[961,5116,1137],{}," not passed to ",[961,5119,1208],{},[4421,5121,5122,5123],{},"Every method on this page throws ",[961,5124,2570],{},[4403,5126,5127,5130],{},[4421,5128,5129],{},"Vector set marked dirty after a write",[4421,5131,5132,5133,3960,5135,5137],{},"Rebuilt lazily on the next ",[961,5134,2562],{},[961,5136,2566],{}," call",[4403,5139,5140,5143],{},[4421,5141,5142],{},"Collection scale",[4421,5144,5145],{},"Cosine scoring is brute-force (no HNSW\u002FIVF); comfortable up to roughly tens of thousands of vectors",[4403,5147,5148,5157],{},[4421,5149,5150,5153,5154,5156],{},[961,5151,5152],{},"crdt: true"," + ",[961,5155,976],{}," on the same collection",[4421,5158,5159],{},"Throws at collection construction",[4403,5161,5162,5170],{},[4421,5163,5164,5166,5167,5169],{},[961,5165,4227],{}," inside a ",[961,5168,1042],{}," query",[4421,5171,5172],{},"Throws — cross-join rows break id recovery",[998,5174,5176],{"id":5175},"see-also","See also",[1090,5178,5179,5194,5202,5211],{},[1093,5180,5181,5183,5184,3960,5187,5190,5191,5193],{},[957,5182,1038],{"href":833}," — the lexical (",[961,5185,5186],{},"L0",[961,5188,5189],{},"L1",") retrieval this page's hybrid mode fuses with, and the ",[961,5192,995],{}," options shared across all three modes.",[1093,5195,5196,5198,5199,5201],{},[957,5197,21],{"href":66}," — the DEK\u002Fkeyring model that encrypts every ",[961,5200,1027],{}," side-car.",[1093,5203,5204,5207,5208,5210],{},[957,5205,5206],{"href":686},"Forget"," — the erasure path whose teardown this page's ",[961,5209,5006],{}," section describes.",[1093,5212,5213,5214,1155,5222,1085],{},"Proven by showcases ",[957,5215,5219],{"href":5216,"rel":5217},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F124-semantic-retrieve.showcase.test.ts",[5218],"nofollow",[961,5220,5221],{},"124-semantic-retrieve",[957,5223,5226],{"href":5224,"rel":5225},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F125-hybrid-retrieve.showcase.test.ts",[5218],[961,5227,5228],{},"125-hybrid-retrieve",[5230,5231,5232],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":1219,"searchDepth":1270,"depth":1270,"links":5234},[5235,5236,5237,5241,5255,5261,5262,5264,5265,5267,5268],{"id":1000,"depth":1263,"text":1001},{"id":1127,"depth":1263,"text":1128},{"id":1190,"depth":1263,"text":1191,"children":5238},[5239],{"id":1626,"depth":1270,"text":5240},"Supplying an encode function",{"id":2574,"depth":1263,"text":2575,"children":5242},[5243,5245,5247,5249,5251,5253],{"id":2578,"depth":1270,"text":5244},"Semantic retrieval — retrieve(query, { mode: 'semantic' })",{"id":3129,"depth":1270,"text":5246},"RetrieveHit\u003CT> shape",{"id":3260,"depth":1270,"text":5248},"collection.similarTo(vector, opts?) — bring your own vector",{"id":3705,"depth":1270,"text":5250},"Hybrid retrieval — retrieve(query, { mode: 'hybrid' })",{"id":3985,"depth":1270,"text":5252},"within — retrieve intersected with a structured query",{"id":4254,"depth":1270,"text":5254},"fuseRetrieval(lists, opts?) — the fusion primitive standalone",{"id":4461,"depth":1263,"text":4462,"children":5256},[5257,5258,5259,5260],{"id":4465,"depth":1270,"text":4468},{"id":4572,"depth":1270,"text":4575},{"id":4665,"depth":1270,"text":3263},{"id":4739,"depth":1270,"text":4742},{"id":4792,"depth":1263,"text":4793},{"id":4831,"depth":1263,"text":5263},"Rebuilding vectors — rebuildEmbeddings()",{"id":4946,"depth":1263,"text":4947},{"id":5003,"depth":1263,"text":5266},"forget() teardown",{"id":5023,"depth":1263,"text":5024},{"id":5175,"depth":1263,"text":5176},null,"Semantic and hybrid retrieval via `withSearch()`: an `embeddings` encoder per collection, `retrieve()`\u002F`similarTo()` by meaning, and lexical⊕semantic fusion.","md",{},"service",{"title":673,"description":5270},"experimental","semantic and hybrid retrieval","important","Bt9qy3D6oDeE5_U4-P4DjSTe0fk35IwGmFbZDvx-pL4",{"data":5280,"body":5281},{},{"type":5282,"children":5283},"root",[5284],{"type":5285,"tag":942,"props":5286,"children":5287},"element",{},[5288,5293],{"type":5285,"tag":961,"props":5289,"children":5291},{"className":5290},[],[5292],{"type":1491,"value":1257},{"type":1491,"value":5294}," (root export — no separate subpath)",{"data":5296,"body":5297},{},{"type":5282,"children":5298},[5299],{"type":5285,"tag":942,"props":5300,"children":5301},{},[5302],{"type":5285,"tag":961,"props":5303,"children":5305},{"className":5304},[],[5306],{"type":1491,"value":963},{"data":5308,"body":5309},{},{"type":5282,"children":5310},[5311],{"type":5285,"tag":942,"props":5312,"children":5313},{},[5314],{"type":5285,"tag":961,"props":5315,"children":5317},{"className":5316},[],[5318],{"type":1491,"value":5319},"with-lookup",1791896583184]