[{"data":1,"prerenderedAt":3953},["ShallowReactive",2],{"navigation":3,"\u002Fservices\u002Fsearch":927,"mdc-2qykxr-key":3911,"mdc--4y0iwl-key":3927,"mdc--hmxmq7-key":3941},[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":832,"access":12,"apiToc":929,"body":930,"category":3901,"description":3902,"extension":3903,"meta":3904,"navigation":3901,"nest":3905,"path":833,"seo":3906,"sinceVersion":3901,"status":3907,"stem":834,"subtitle":3908,"tier":3909,"tocExternal":3901,"__hash__":3910},"docs\u002Fservices\u002Fsearch.md",false,{"type":931,"value":932,"toc":3873},"minimark",[933,937,941,945,997,1002,1009,1012,1032,1058,1079,1103,1107,1158,1162,1191,1544,1549,1553,1561,1564,1774,1789,1801,1808,1832,1997,2002,2005,2011,2066,2073,2078,2154,2159,2223,2229,2282,2296,2301,2447,2452,2572,2585,2590,2686,2702,2707,2725,2742,2747,2763,2774,2778,2866,2870,3005,3014,3180,3186,3192,3203,3210,3242,3252,3259,3269,3360,3380,3387,3394,3431,3437,3534,3539,3643,3650,3654,3784,3788,3869],[934,935,832],"h1",{"id":936},"search-full-text",[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."," Search and ",[957,958,673],"a",{"href":674}," 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",{},"words"," — full-text ",[961,975,976],{},"search()"," and indexed lexical ",[961,979,980],{},"retrieve()",". ",[952,983,984],{},"The other page",[970,986,987],{},"meaning"," — semantic retrieval via an ",[961,990,991],{},"embeddings"," encoder, ",[961,994,995],{},"similarTo()",", and hybrid lexical⊕semantic fusion. Opting in once enables both.",[998,999,1001],"h2",{"id":1000},"what-it-is","What it is",[942,1003,1004,1005,1008],{},"Search moves keyword lookup — full-text search, typeahead, \"find records matching these words\" — out of your application code and into the database, without weakening ",[957,1006,1007],{"href":42},"zero-knowledge"," (noy-db's core guarantee: the store only ever holds ciphertext, and no server or storage backend can decrypt it): every match is computed client-side, after decryption, and nothing about the query or the matched terms is written to the store.",[942,1010,1011],{},"There are two ways to search by keyword, both covered on this page:",[1013,1014,1015,1024],"ul",{},[1016,1017,1018,1023],"li",{},[952,1019,1020],{},[961,1021,1022],{},"collection.search()"," — a zero-setup scan: decrypt the collection and rank matches with BM25 on every call. No index to build or keep warm; the right default for most collections.",[1016,1025,1026,1031],{},[952,1027,1028],{},[961,1029,1030],{},"collection.retrieve()"," — an indexed path: build an in-memory inverted index once (client-side, never written to the store by default), then serve ranked, multi-field hits with snippet extraction. Optionally persist the index as an encrypted blob so it survives across sessions.",[942,1033,1034,1036,1037,1040,1041,1043,1044,1047,1048,1051,1052,1054,1055,1057],{},[961,1035,1030],{}," also has a ",[961,1038,1039],{},"mode"," option for searching by ",[970,1042,987],{}," instead of exact words (",[961,1045,1046],{},"'semantic'",") or combining both (",[961,1049,1050],{},"'hybrid'",") — those modes need an ",[961,1053,991],{}," config and are documented on the ",[957,1056,673],{"href":674}," page, which this page's lexical mode feeds into.",[946,1059,1061],{"color":948,"icon":1060},"i-lucide-search",[942,1062,1063,1066,1067,1070,1071,1074,1075,1078],{},[952,1064,1065],{},"Why lexical search still matters."," Even as AI-powered ",[957,1068,1069],{"href":674},"semantic search"," spreads, keyword search stays essential — sometimes the ",[970,1072,1073],{},"literal"," word is the point. Invoice numbers, product SKUs, people's names, error codes, legal terms: for these, \"close in meaning\" is wrong and an exact-token match is right. BM25 is also self-contained and cheap — no model, no encoder, no external call, deterministic ranking you can reason about, and it runs fully offline. That's why the strongest setups use ",[952,1076,1077],{},"hybrid"," retrieval: semantic search finds meaning, lexical search nails the exact tokens, and fusing the two beats either alone.",[942,1080,1081,1082,1084,1085,1087,1088,1091,1092,1095,1096,1091,1099,1102],{},"Both ",[961,1083,976],{}," and ",[961,1086,980],{}," require ",[952,1089,1090],{},"eager mode"," (",[961,1093,1094],{},"prefetch: true",", the default) — they read the fully-decrypted in-memory cache and throw in ",[957,1097,1098],{"href":720},"lazy mode",[961,1100,1101],{},"prefetch: false",").",[998,1104,1106],{"id":1105},"prerequisites","Prerequisites",[1013,1108,1109,1118,1138,1146],{},[1016,1110,1111,1114,1115,1117],{},[952,1112,1113],{},"None"," for ",[961,1116,976],{}," — it scans whatever field you name at call time.",[1016,1119,1120,1130,1131,1134,1135,1137],{},[970,1121,1122,1123,1125,1126,1129],{},"For indexed ",[961,1124,980],{}," \u002F ",[961,1127,1128],{},"warmIndex()",":"," a ",[961,1132,1133],{},"textIndexes"," allowlist declared on the collection — calling ",[961,1136,980],{}," without one throws.",[1016,1139,1140,1145],{},[970,1141,1142,1143,1129],{},"For ",[961,1144,1128],{}," eager mode (the default); pre-building on a lazy collection throws.",[1016,1147,1148,1151,1152,1154,1155,1157],{},[970,1149,1150],{},"For semantic \u002F hybrid modes:"," an ",[961,1153,991],{}," encoder config — see ",[957,1156,673],{"href":674},".",[998,1159,1161],{"id":1160},"opt-in","Opt in",[942,1163,1164,1165,1167,1168,1171,1172,1174,1175,1174,1177,1174,1180,1183,1184,1187,1188,1157],{},"Search and retrieval are gated behind a ",[961,1166,963],{}," capability you pass to ",[961,1169,1170],{},"createNoydb()",". Without it, ",[961,1173,1022],{},", ",[961,1176,1030],{},[961,1178,1179],{},"collection.similarTo()",[961,1181,1182],{},"collection.warmIndex()",", and ",[961,1185,1186],{},"collection.flushIndex()"," all throw ",[961,1189,1190],{},"SearchNotEnabledError",[1192,1193,1198],"pre",{"className":1194,"code":1195,"language":1196,"meta":1197,"style":1197},"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 Invoice { id: string; title: string; statusLabel: string; notes: string; category: string; attachmentName: string }\n\n\u002F\u002F search() needs nothing else — it scans whatever field you name at call time.\n\u002F\u002F retrieve() additionally needs an explicit opt-in allowlist of fields to index:\nconst invoices = vault.collection\u003CInvoice>('invoices', {\n  textIndexes: ['title', 'statusLabel', 'attachmentName'],\n})\n","ts","",[961,1199,1200,1239,1246,1271,1291,1308,1323,1332,1363,1368,1437,1442,1449,1455,1496,1537],{"__ignoreMap":1197},[1201,1202,1205,1209,1213,1217,1220,1223,1226,1229,1232,1236],"span",{"class":1203,"line":1204},"line",1,[1201,1206,1208],{"class":1207},"s7zQu","import",[1201,1210,1212],{"class":1211},"sMK4o"," {",[1201,1214,1216],{"class":1215},"sTEyZ"," createNoydb",[1201,1218,1219],{"class":1211},",",[1201,1221,1222],{"class":1215}," withSearch",[1201,1224,1225],{"class":1211}," }",[1201,1227,1228],{"class":1207}," from",[1201,1230,1231],{"class":1211}," '",[1201,1233,1235],{"class":1234},"sfazB","@noy-db\u002Fhub",[1201,1237,1238],{"class":1211},"'\n",[1201,1240,1242],{"class":1203,"line":1241},2,[1201,1243,1245],{"emptyLinePlaceholder":1244},true,"\n",[1201,1247,1249,1253,1256,1259,1262,1265,1268],{"class":1203,"line":1248},3,[1201,1250,1252],{"class":1251},"spNyl","const",[1201,1254,1255],{"class":1215}," db ",[1201,1257,1258],{"class":1211},"=",[1201,1260,1261],{"class":1207}," await",[1201,1263,1216],{"class":1264},"s2Zo4",[1201,1266,1267],{"class":1215},"(",[1201,1269,1270],{"class":1211},"{\n",[1201,1272,1274,1278,1280,1282,1285,1288],{"class":1203,"line":1273},4,[1201,1275,1277],{"class":1276},"swJcz","  user",[1201,1279,1129],{"class":1211},[1201,1281,1231],{"class":1211},[1201,1283,1284],{"class":1234},"alice",[1201,1286,1287],{"class":1211},"'",[1201,1289,1290],{"class":1211},",\n",[1201,1292,1294,1297,1299,1301,1304,1306],{"class":1203,"line":1293},5,[1201,1295,1296],{"class":1276},"  secret",[1201,1298,1129],{"class":1211},[1201,1300,1231],{"class":1211},[1201,1302,1303],{"class":1234},"alice-secret-2026",[1201,1305,1287],{"class":1211},[1201,1307,1290],{"class":1211},[1201,1309,1311,1314,1316,1318,1321],{"class":1203,"line":1310},6,[1201,1312,1313],{"class":1276},"  searchStrategy",[1201,1315,1129],{"class":1211},[1201,1317,1222],{"class":1264},[1201,1319,1320],{"class":1215},"()",[1201,1322,1290],{"class":1211},[1201,1324,1326,1329],{"class":1203,"line":1325},7,[1201,1327,1328],{"class":1211},"}",[1201,1330,1331],{"class":1215},")\n",[1201,1333,1335,1337,1340,1342,1344,1347,1349,1352,1354,1356,1359,1361],{"class":1203,"line":1334},8,[1201,1336,1252],{"class":1251},[1201,1338,1339],{"class":1215}," vault ",[1201,1341,1258],{"class":1211},[1201,1343,1261],{"class":1207},[1201,1345,1346],{"class":1215}," db",[1201,1348,1157],{"class":1211},[1201,1350,1351],{"class":1264},"openVault",[1201,1353,1267],{"class":1215},[1201,1355,1287],{"class":1211},[1201,1357,1358],{"class":1234},"books",[1201,1360,1287],{"class":1211},[1201,1362,1331],{"class":1215},[1201,1364,1366],{"class":1203,"line":1365},9,[1201,1367,1245],{"emptyLinePlaceholder":1244},[1201,1369,1371,1374,1378,1380,1383,1385,1388,1391,1394,1396,1398,1400,1403,1405,1407,1409,1412,1414,1416,1418,1421,1423,1425,1427,1430,1432,1434],{"class":1203,"line":1370},10,[1201,1372,1373],{"class":1251},"interface",[1201,1375,1377],{"class":1376},"sBMFI"," Invoice",[1201,1379,1212],{"class":1211},[1201,1381,1382],{"class":1276}," id",[1201,1384,1129],{"class":1211},[1201,1386,1387],{"class":1376}," string",[1201,1389,1390],{"class":1211},";",[1201,1392,1393],{"class":1276}," title",[1201,1395,1129],{"class":1211},[1201,1397,1387],{"class":1376},[1201,1399,1390],{"class":1211},[1201,1401,1402],{"class":1276}," statusLabel",[1201,1404,1129],{"class":1211},[1201,1406,1387],{"class":1376},[1201,1408,1390],{"class":1211},[1201,1410,1411],{"class":1276}," notes",[1201,1413,1129],{"class":1211},[1201,1415,1387],{"class":1376},[1201,1417,1390],{"class":1211},[1201,1419,1420],{"class":1276}," category",[1201,1422,1129],{"class":1211},[1201,1424,1387],{"class":1376},[1201,1426,1390],{"class":1211},[1201,1428,1429],{"class":1276}," attachmentName",[1201,1431,1129],{"class":1211},[1201,1433,1387],{"class":1376},[1201,1435,1436],{"class":1211}," }\n",[1201,1438,1440],{"class":1203,"line":1439},11,[1201,1441,1245],{"emptyLinePlaceholder":1244},[1201,1443,1445],{"class":1203,"line":1444},12,[1201,1446,1448],{"class":1447},"sHwdD","\u002F\u002F search() needs nothing else — it scans whatever field you name at call time.\n",[1201,1450,1452],{"class":1203,"line":1451},13,[1201,1453,1454],{"class":1447},"\u002F\u002F retrieve() additionally needs an explicit opt-in allowlist of fields to index:\n",[1201,1456,1458,1460,1463,1465,1468,1470,1473,1476,1479,1482,1484,1486,1489,1491,1493],{"class":1203,"line":1457},14,[1201,1459,1252],{"class":1251},[1201,1461,1462],{"class":1215}," invoices ",[1201,1464,1258],{"class":1211},[1201,1466,1467],{"class":1215}," vault",[1201,1469,1157],{"class":1211},[1201,1471,1472],{"class":1264},"collection",[1201,1474,1475],{"class":1211},"\u003C",[1201,1477,1478],{"class":1376},"Invoice",[1201,1480,1481],{"class":1211},">",[1201,1483,1267],{"class":1215},[1201,1485,1287],{"class":1211},[1201,1487,1488],{"class":1234},"invoices",[1201,1490,1287],{"class":1211},[1201,1492,1219],{"class":1211},[1201,1494,1495],{"class":1211}," {\n",[1201,1497,1499,1502,1504,1507,1509,1512,1514,1516,1518,1521,1523,1525,1527,1530,1532,1535],{"class":1203,"line":1498},15,[1201,1500,1501],{"class":1276},"  textIndexes",[1201,1503,1129],{"class":1211},[1201,1505,1506],{"class":1215}," [",[1201,1508,1287],{"class":1211},[1201,1510,1511],{"class":1234},"title",[1201,1513,1287],{"class":1211},[1201,1515,1219],{"class":1211},[1201,1517,1231],{"class":1211},[1201,1519,1520],{"class":1234},"statusLabel",[1201,1522,1287],{"class":1211},[1201,1524,1219],{"class":1211},[1201,1526,1231],{"class":1211},[1201,1528,1529],{"class":1234},"attachmentName",[1201,1531,1287],{"class":1211},[1201,1533,1534],{"class":1215},"]",[1201,1536,1290],{"class":1211},[1201,1538,1540,1542],{"class":1203,"line":1539},16,[1201,1541,1328],{"class":1211},[1201,1543,1331],{"class":1215},[942,1545,1546,1548],{},[961,1547,963],{}," is dynamically imported behind the scenes, so the search\u002Fretrieval engine stays out of your bundle until you opt in.",[998,1550,1552],{"id":1551},"usage","Usage",[1554,1555,1557,1560],"h3",{"id":1556},"collectionsearchfield-query-opts-scan-mode",[961,1558,1559],{},"collection.search(field, query, opts)"," — scan mode",[942,1562,1563],{},"Ranks records by relevance against a tokenized query, scoring in memory with BM25 on every call.",[1192,1565,1567],{"className":1194,"code":1566,"language":1196,"meta":1197,"style":1197},"const hits = await invoices.search('title', 'overdue invoice')\n\u002F\u002F → [{ id, score, record }, …]  (best first, OR of query terms)\n\nawait invoices.search('title', 'overdue invoice', { match: 'all' })\n\u002F\u002F → same shape, AND of query terms — a record must contain both \"overdue\" and \"invoice\"\n\nawait invoices.search('title', 'mee', { prefix: true })\n\u002F\u002F → same shape — the last term (\"mee\") is matched as a prefix, e.g. \"meeting\"\n\nawait invoices.search('title', 'invoice', { limit: 10 })\n\u002F\u002F → same shape, capped to the top 10 by score\n",[961,1568,1569,1607,1612,1616,1663,1668,1672,1716,1721,1725,1769],{"__ignoreMap":1197},[1201,1570,1571,1573,1576,1578,1580,1583,1585,1588,1590,1592,1594,1596,1598,1600,1603,1605],{"class":1203,"line":1204},[1201,1572,1252],{"class":1251},[1201,1574,1575],{"class":1215}," hits ",[1201,1577,1258],{"class":1211},[1201,1579,1261],{"class":1207},[1201,1581,1582],{"class":1215}," invoices",[1201,1584,1157],{"class":1211},[1201,1586,1587],{"class":1264},"search",[1201,1589,1267],{"class":1215},[1201,1591,1287],{"class":1211},[1201,1593,1511],{"class":1234},[1201,1595,1287],{"class":1211},[1201,1597,1219],{"class":1211},[1201,1599,1231],{"class":1211},[1201,1601,1602],{"class":1234},"overdue invoice",[1201,1604,1287],{"class":1211},[1201,1606,1331],{"class":1215},[1201,1608,1609],{"class":1203,"line":1241},[1201,1610,1611],{"class":1447},"\u002F\u002F → [{ id, score, record }, …]  (best first, OR of query terms)\n",[1201,1613,1614],{"class":1203,"line":1248},[1201,1615,1245],{"emptyLinePlaceholder":1244},[1201,1617,1618,1621,1623,1625,1627,1629,1631,1633,1635,1637,1639,1641,1643,1645,1647,1650,1652,1654,1657,1659,1661],{"class":1203,"line":1273},[1201,1619,1620],{"class":1207},"await",[1201,1622,1582],{"class":1215},[1201,1624,1157],{"class":1211},[1201,1626,1587],{"class":1264},[1201,1628,1267],{"class":1215},[1201,1630,1287],{"class":1211},[1201,1632,1511],{"class":1234},[1201,1634,1287],{"class":1211},[1201,1636,1219],{"class":1211},[1201,1638,1231],{"class":1211},[1201,1640,1602],{"class":1234},[1201,1642,1287],{"class":1211},[1201,1644,1219],{"class":1211},[1201,1646,1212],{"class":1211},[1201,1648,1649],{"class":1276}," match",[1201,1651,1129],{"class":1211},[1201,1653,1231],{"class":1211},[1201,1655,1656],{"class":1234},"all",[1201,1658,1287],{"class":1211},[1201,1660,1225],{"class":1211},[1201,1662,1331],{"class":1215},[1201,1664,1665],{"class":1203,"line":1293},[1201,1666,1667],{"class":1447},"\u002F\u002F → same shape, AND of query terms — a record must contain both \"overdue\" and \"invoice\"\n",[1201,1669,1670],{"class":1203,"line":1310},[1201,1671,1245],{"emptyLinePlaceholder":1244},[1201,1673,1674,1676,1678,1680,1682,1684,1686,1688,1690,1692,1694,1697,1699,1701,1703,1706,1708,1712,1714],{"class":1203,"line":1325},[1201,1675,1620],{"class":1207},[1201,1677,1582],{"class":1215},[1201,1679,1157],{"class":1211},[1201,1681,1587],{"class":1264},[1201,1683,1267],{"class":1215},[1201,1685,1287],{"class":1211},[1201,1687,1511],{"class":1234},[1201,1689,1287],{"class":1211},[1201,1691,1219],{"class":1211},[1201,1693,1231],{"class":1211},[1201,1695,1696],{"class":1234},"mee",[1201,1698,1287],{"class":1211},[1201,1700,1219],{"class":1211},[1201,1702,1212],{"class":1211},[1201,1704,1705],{"class":1276}," prefix",[1201,1707,1129],{"class":1211},[1201,1709,1711],{"class":1710},"sfNiH"," true",[1201,1713,1225],{"class":1211},[1201,1715,1331],{"class":1215},[1201,1717,1718],{"class":1203,"line":1334},[1201,1719,1720],{"class":1447},"\u002F\u002F → same shape — the last term (\"mee\") is matched as a prefix, e.g. \"meeting\"\n",[1201,1722,1723],{"class":1203,"line":1365},[1201,1724,1245],{"emptyLinePlaceholder":1244},[1201,1726,1727,1729,1731,1733,1735,1737,1739,1741,1743,1745,1747,1750,1752,1754,1756,1759,1761,1765,1767],{"class":1203,"line":1370},[1201,1728,1620],{"class":1207},[1201,1730,1582],{"class":1215},[1201,1732,1157],{"class":1211},[1201,1734,1587],{"class":1264},[1201,1736,1267],{"class":1215},[1201,1738,1287],{"class":1211},[1201,1740,1511],{"class":1234},[1201,1742,1287],{"class":1211},[1201,1744,1219],{"class":1211},[1201,1746,1231],{"class":1211},[1201,1748,1749],{"class":1234},"invoice",[1201,1751,1287],{"class":1211},[1201,1753,1219],{"class":1211},[1201,1755,1212],{"class":1211},[1201,1757,1758],{"class":1276}," limit",[1201,1760,1129],{"class":1211},[1201,1762,1764],{"class":1763},"sbssI"," 10",[1201,1766,1225],{"class":1211},[1201,1768,1331],{"class":1215},[1201,1770,1771],{"class":1203,"line":1439},[1201,1772,1773],{"class":1447},"\u002F\u002F → same shape, capped to the top 10 by score\n",[942,1775,1776,1777,1780,1781,1784,1785,1788],{},"Scan mode decrypts the collection in memory and scores client-side, so ",[952,1778,1779],{},"nothing searchable is written to the store"," — it adds ",[970,1782,1783],{},"no"," leakage beyond what reading the collection already does. It's the safe default for sensitive fields (names, notes). Cost is O(n) per query. If the collection also carries large fields you never search, moving them to a ",[957,1786,1787],{"href":813},"satellite collection"," keeps them off this decrypt path.",[942,1790,1791,1792,1795,1796,1800],{},"Results are descending by score. Deleted or ",[957,1793,1794],{"href":686},"forgotten"," records never appear. Full option and return-shape reference: see ",[957,1797,1799],{"href":1798},"#api-reference","API reference"," below.",[1554,1802,1804,1807],{"id":1803},"collectionretrievequery-opts-lexical-index",[961,1805,1806],{},"collection.retrieve(query, opts)"," — lexical index",[942,1809,1810,1811,1814,1815,1818,1819,1822,1823,1826,1827,1829,1830,1137],{},"Builds an ",[952,1812,1813],{},"in-memory inverted index"," on first call (or on collection open, if ",[961,1816,1817],{},"warmIndexOnOpen: true","), then scores query terms with ",[952,1820,1821],{},"multi-field BM25"," and returns ranked hits with ",[952,1824,1825],{},"per-hit snippet extraction",". Requires the collection to declare ",[961,1828,1133],{}," (as configured above); calling ",[961,1831,980],{},[1192,1833,1835],{"className":1194,"code":1834,"language":1196,"meta":1197,"style":1197},"\u002F\u002F Multi-field ranked search, over the `invoices` collection from Opt in:\nconst hits = await invoices.retrieve('overdue invoice')\n\u002F\u002F → RetrieveHit[]  (best first)\n\u002F\u002F   { id, score, rank, field, snippet, locale?, record? }\n\n\u002F\u002F Prefix autocomplete (typeahead):\nconst ac = await invoices.retrieve('over', { prefix: true, limit: 5 })\n\u002F\u002F → same shape, capped to the top 5 hits, last term (\"over\") matched as a prefix\n\n\u002F\u002F Include the full decrypted record:\nconst detail = await invoices.retrieve('overdue', { includeRecord: true })\n\u002F\u002F → same shape, each hit additionally carries `record: Invoice`\n",[961,1836,1837,1842,1869,1874,1879,1883,1888,1937,1942,1946,1951,1992],{"__ignoreMap":1197},[1201,1838,1839],{"class":1203,"line":1204},[1201,1840,1841],{"class":1447},"\u002F\u002F Multi-field ranked search, over the `invoices` collection from Opt in:\n",[1201,1843,1844,1846,1848,1850,1852,1854,1856,1859,1861,1863,1865,1867],{"class":1203,"line":1241},[1201,1845,1252],{"class":1251},[1201,1847,1575],{"class":1215},[1201,1849,1258],{"class":1211},[1201,1851,1261],{"class":1207},[1201,1853,1582],{"class":1215},[1201,1855,1157],{"class":1211},[1201,1857,1858],{"class":1264},"retrieve",[1201,1860,1267],{"class":1215},[1201,1862,1287],{"class":1211},[1201,1864,1602],{"class":1234},[1201,1866,1287],{"class":1211},[1201,1868,1331],{"class":1215},[1201,1870,1871],{"class":1203,"line":1248},[1201,1872,1873],{"class":1447},"\u002F\u002F → RetrieveHit[]  (best first)\n",[1201,1875,1876],{"class":1203,"line":1273},[1201,1877,1878],{"class":1447},"\u002F\u002F   { id, score, rank, field, snippet, locale?, record? }\n",[1201,1880,1881],{"class":1203,"line":1293},[1201,1882,1245],{"emptyLinePlaceholder":1244},[1201,1884,1885],{"class":1203,"line":1310},[1201,1886,1887],{"class":1447},"\u002F\u002F Prefix autocomplete (typeahead):\n",[1201,1889,1890,1892,1895,1897,1899,1901,1903,1905,1907,1909,1912,1914,1916,1918,1920,1922,1924,1926,1928,1930,1933,1935],{"class":1203,"line":1325},[1201,1891,1252],{"class":1251},[1201,1893,1894],{"class":1215}," ac ",[1201,1896,1258],{"class":1211},[1201,1898,1261],{"class":1207},[1201,1900,1582],{"class":1215},[1201,1902,1157],{"class":1211},[1201,1904,1858],{"class":1264},[1201,1906,1267],{"class":1215},[1201,1908,1287],{"class":1211},[1201,1910,1911],{"class":1234},"over",[1201,1913,1287],{"class":1211},[1201,1915,1219],{"class":1211},[1201,1917,1212],{"class":1211},[1201,1919,1705],{"class":1276},[1201,1921,1129],{"class":1211},[1201,1923,1711],{"class":1710},[1201,1925,1219],{"class":1211},[1201,1927,1758],{"class":1276},[1201,1929,1129],{"class":1211},[1201,1931,1932],{"class":1763}," 5",[1201,1934,1225],{"class":1211},[1201,1936,1331],{"class":1215},[1201,1938,1939],{"class":1203,"line":1334},[1201,1940,1941],{"class":1447},"\u002F\u002F → same shape, capped to the top 5 hits, last term (\"over\") matched as a prefix\n",[1201,1943,1944],{"class":1203,"line":1365},[1201,1945,1245],{"emptyLinePlaceholder":1244},[1201,1947,1948],{"class":1203,"line":1370},[1201,1949,1950],{"class":1447},"\u002F\u002F Include the full decrypted record:\n",[1201,1952,1953,1955,1958,1960,1962,1964,1966,1968,1970,1972,1975,1977,1979,1981,1984,1986,1988,1990],{"class":1203,"line":1439},[1201,1954,1252],{"class":1251},[1201,1956,1957],{"class":1215}," detail ",[1201,1959,1258],{"class":1211},[1201,1961,1261],{"class":1207},[1201,1963,1582],{"class":1215},[1201,1965,1157],{"class":1211},[1201,1967,1858],{"class":1264},[1201,1969,1267],{"class":1215},[1201,1971,1287],{"class":1211},[1201,1973,1974],{"class":1234},"overdue",[1201,1976,1287],{"class":1211},[1201,1978,1219],{"class":1211},[1201,1980,1212],{"class":1211},[1201,1982,1983],{"class":1276}," includeRecord",[1201,1985,1129],{"class":1211},[1201,1987,1711],{"class":1710},[1201,1989,1225],{"class":1211},[1201,1991,1331],{"class":1215},[1201,1993,1994],{"class":1203,"line":1444},[1201,1995,1996],{"class":1447},"\u002F\u002F → same shape, each hit additionally carries `record: Invoice`\n",[942,1998,1999,2000,1800],{},"Full option and return-shape reference: see ",[957,2001,1799],{"href":1798},[998,2003,1799],{"id":2004},"api-reference",[1554,2006,2008],{"id":2007},"collectionsearchfield-query-opts",[961,2009,2010],{},"collection.search(field, query, opts?)",[1192,2012,2014],{"className":1194,"code":2013,"language":1196,"meta":1197,"style":1197},"search\u003CT>(field: string, query: string, opts?: SearchOptions): Promise\u003CSearchResult\u003CT>[]>\n",[961,2015,2016],{"__ignoreMap":1197},[1201,2017,2018,2020,2022,2025,2027,2030,2032,2035,2037,2040,2043,2046,2049,2051,2054,2056,2058,2060,2063],{"class":1203,"line":1204},[1201,2019,1587],{"class":1264},[1201,2021,1475],{"class":1211},[1201,2023,2024],{"class":1376},"T",[1201,2026,1481],{"class":1211},[1201,2028,2029],{"class":1215},"(field: string",[1201,2031,1219],{"class":1211},[1201,2033,2034],{"class":1215}," query: string",[1201,2036,1219],{"class":1211},[1201,2038,2039],{"class":1215}," opts",[1201,2041,2042],{"class":1211},"?:",[1201,2044,2045],{"class":1215}," SearchOptions): ",[1201,2047,2048],{"class":1376},"Promise",[1201,2050,1475],{"class":1211},[1201,2052,2053],{"class":1215},"SearchResult",[1201,2055,1475],{"class":1211},[1201,2057,2024],{"class":1215},[1201,2059,1481],{"class":1211},[1201,2061,2062],{"class":1215},"[]",[1201,2064,2065],{"class":1211},">\n",[942,2067,2068,2069,2072],{},"Scan-mode BM25 search over one named field, decrypting and scoring in memory on every call — see ",[957,2070,1552],{"href":2071},"#usage"," above.",[942,2074,2075,1129],{},[961,2076,2077],{},"SearchOptions",[2079,2080,2081,2097],"table",{},[2082,2083,2084],"thead",{},[2085,2086,2087,2091,2094],"tr",{},[2088,2089,2090],"th",{},"Option",[2088,2092,2093],{},"Default",[2088,2095,2096],{},"Meaning",[2098,2099,2100,2122,2141],"tbody",{},[2085,2101,2102,2108,2113],{},[2103,2104,2105],"td",{},[961,2106,2107],{},"match",[2103,2109,2110],{},[961,2111,2112],{},"'any'",[2103,2114,2115,2117,2118,2121],{},[961,2116,2112],{}," = OR of query terms; ",[961,2119,2120],{},"'all'"," = every term must match",[2085,2123,2124,2129,2134],{},[2103,2125,2126],{},[961,2127,2128],{},"prefix",[2103,2130,2131],{},[961,2132,2133],{},"false",[2103,2135,2136,2137,2140],{},"Treat the ",[952,2138,2139],{},"last"," query term as a prefix (typeahead)",[2085,2142,2143,2148,2151],{},[2103,2144,2145],{},[961,2146,2147],{},"limit",[2103,2149,2150],{},"—",[2103,2152,2153],{},"Return only the top-N by score",[942,2155,2156,1129],{},[961,2157,2158],{},"SearchResult\u003CT>",[1192,2160,2162],{"className":1194,"code":2161,"language":1196,"meta":1197,"style":1197},"interface SearchResult\u003CT> {\n  readonly id: string\n  readonly score: number   \u002F\u002F BM25, descending\n  readonly record: T\n}\n",[961,2163,2164,2179,2191,2206,2218],{"__ignoreMap":1197},[1201,2165,2166,2168,2171,2173,2175,2177],{"class":1203,"line":1204},[1201,2167,1373],{"class":1251},[1201,2169,2170],{"class":1376}," SearchResult",[1201,2172,1475],{"class":1211},[1201,2174,2024],{"class":1376},[1201,2176,1481],{"class":1211},[1201,2178,1495],{"class":1211},[1201,2180,2181,2184,2186,2188],{"class":1203,"line":1241},[1201,2182,2183],{"class":1251},"  readonly",[1201,2185,1382],{"class":1276},[1201,2187,1129],{"class":1211},[1201,2189,2190],{"class":1376}," string\n",[1201,2192,2193,2195,2198,2200,2203],{"class":1203,"line":1248},[1201,2194,2183],{"class":1251},[1201,2196,2197],{"class":1276}," score",[1201,2199,1129],{"class":1211},[1201,2201,2202],{"class":1376}," number",[1201,2204,2205],{"class":1447},"   \u002F\u002F BM25, descending\n",[1201,2207,2208,2210,2213,2215],{"class":1203,"line":1273},[1201,2209,2183],{"class":1251},[1201,2211,2212],{"class":1276}," record",[1201,2214,1129],{"class":1211},[1201,2216,2217],{"class":1376}," T\n",[1201,2219,2220],{"class":1203,"line":1293},[1201,2221,2222],{"class":1211},"}\n",[1554,2224,2226],{"id":2225},"collectionretrievequery-opts",[961,2227,2228],{},"collection.retrieve(query, opts?)",[1192,2230,2232],{"className":1194,"code":2231,"language":1196,"meta":1197,"style":1197},"retrieve\u003CT>(query: string, opts?: RetrieveOptions\u003CT>): Promise\u003CRetrieveHit\u003CT>[]>\n",[961,2233,2234],{"__ignoreMap":1197},[1201,2235,2236,2238,2240,2242,2244,2247,2249,2251,2253,2256,2258,2260,2262,2265,2267,2269,2272,2274,2276,2278,2280],{"class":1203,"line":1204},[1201,2237,1858],{"class":1264},[1201,2239,1475],{"class":1211},[1201,2241,2024],{"class":1376},[1201,2243,1481],{"class":1211},[1201,2245,2246],{"class":1215},"(query: string",[1201,2248,1219],{"class":1211},[1201,2250,2039],{"class":1215},[1201,2252,2042],{"class":1211},[1201,2254,2255],{"class":1215}," RetrieveOptions",[1201,2257,1475],{"class":1211},[1201,2259,2024],{"class":1215},[1201,2261,1481],{"class":1211},[1201,2263,2264],{"class":1215},"): ",[1201,2266,2048],{"class":1376},[1201,2268,1475],{"class":1211},[1201,2270,2271],{"class":1215},"RetrieveHit",[1201,2273,1475],{"class":1211},[1201,2275,2024],{"class":1215},[1201,2277,1481],{"class":1211},[1201,2279,2062],{"class":1215},[1201,2281,2065],{"class":1211},[942,2283,2284,2285,2287,2288,2290,2291,2293,2294,1102],{},"Indexed, multi-field BM25 retrieval with snippet extraction, over the fields declared in ",[961,2286,1133],{}," — see ",[957,2289,1552],{"href":2071}," above. Throws if the collection has no ",[961,2292,1133],{}," configured, and throws in lazy mode (",[961,2295,1101],{},[942,2297,2298,1129],{},[961,2299,2300],{},"RetrieveOptions\u003CT>",[2079,2302,2303,2313],{},[2082,2304,2305],{},[2085,2306,2307,2309,2311],{},[2088,2308,2090],{},[2088,2310,2093],{},[2088,2312,2096],{},[2098,2314,2315,2338,2349,2367,2380,2395,2410,2424],{},[2085,2316,2317,2321,2326],{},[2103,2318,2319],{},[961,2320,1039],{},[2103,2322,2323],{},[961,2324,2325],{},"'lexical'",[2103,2327,2328,2330,2331,2333,2334,2287,2336],{},[961,2329,2325],{}," (this page's BM25 index), ",[961,2332,1046],{},", or ",[961,2335,1050],{},[957,2337,673],{"href":674},[2085,2339,2340,2344,2346],{},[2103,2341,2342],{},[961,2343,2147],{},[2103,2345,2150],{},[2103,2347,2348],{},"Return top-N hits only",[2085,2350,2351,2355,2359],{},[2103,2352,2353],{},[961,2354,2107],{},[2103,2356,2357],{},[961,2358,2112],{},[2103,2360,2361,2363,2364,2366],{},[961,2362,2112],{}," = OR, ",[961,2365,2120],{}," = AND of query terms",[2085,2368,2369,2373,2377],{},[2103,2370,2371],{},[961,2372,2128],{},[2103,2374,2375],{},[961,2376,2133],{},[2103,2378,2379],{},"Last query term is a prefix (typeahead \u002F autocomplete)",[2085,2381,2382,2387,2392],{},[2103,2383,2384],{},[961,2385,2386],{},"snippetWindow",[2103,2388,2389],{},[961,2390,2391],{},"80",[2103,2393,2394],{},"Half-window char count around the best match",[2085,2396,2397,2402,2407],{},[2103,2398,2399],{},[961,2400,2401],{},"fields",[2103,2403,2404,2405],{},"all ",[961,2406,1133],{},[2103,2408,2409],{},"Restrict search to a subset of indexed fields",[2085,2411,2412,2417,2421],{},[2103,2413,2414],{},[961,2415,2416],{},"includeRecord",[2103,2418,2419],{},[961,2420,2133],{},[2103,2422,2423],{},"Attach the full decrypted record to each hit",[2085,2425,2426,2431,2433],{},[2103,2427,2428],{},[961,2429,2430],{},"within",[2103,2432,2150],{},[2103,2434,2435,2436,2439,2440,2443,2444],{},"A ",[961,2437,2438],{},"Query\u003CT>"," from ",[961,2441,2442],{},"collection.query().where(…)"," — intersects hits with a predicate; see ",[957,2445,673],{"href":2446},"\u002Fservices\u002Fembeddings#within-retrieve-intersected-with-a-structured-query",[942,2448,2449,1129],{},[961,2450,2451],{},"RetrieveHit\u003CT>",[1192,2453,2455],{"className":1194,"code":2454,"language":1196,"meta":1197,"style":1197},"interface RetrieveHit\u003CT> {\n  readonly id: string       \u002F\u002F record key\n  readonly score: number    \u002F\u002F BM25, descending\n  readonly rank: number     \u002F\u002F 1-based position, monotonic with score order\n  readonly field: string    \u002F\u002F winning field (highest per-field BM25)\n  readonly snippet: string  \u002F\u002F ±window chars around the best match\n  readonly locale?: string  \u002F\u002F set for i18n-text and dictionary-key hits\n  readonly record?: T       \u002F\u002F only when includeRecord: true\n}\n",[961,2456,2457,2472,2485,2498,2512,2526,2540,2554,2568],{"__ignoreMap":1197},[1201,2458,2459,2461,2464,2466,2468,2470],{"class":1203,"line":1204},[1201,2460,1373],{"class":1251},[1201,2462,2463],{"class":1376}," RetrieveHit",[1201,2465,1475],{"class":1211},[1201,2467,2024],{"class":1376},[1201,2469,1481],{"class":1211},[1201,2471,1495],{"class":1211},[1201,2473,2474,2476,2478,2480,2482],{"class":1203,"line":1241},[1201,2475,2183],{"class":1251},[1201,2477,1382],{"class":1276},[1201,2479,1129],{"class":1211},[1201,2481,1387],{"class":1376},[1201,2483,2484],{"class":1447},"       \u002F\u002F record key\n",[1201,2486,2487,2489,2491,2493,2495],{"class":1203,"line":1248},[1201,2488,2183],{"class":1251},[1201,2490,2197],{"class":1276},[1201,2492,1129],{"class":1211},[1201,2494,2202],{"class":1376},[1201,2496,2497],{"class":1447},"    \u002F\u002F BM25, descending\n",[1201,2499,2500,2502,2505,2507,2509],{"class":1203,"line":1273},[1201,2501,2183],{"class":1251},[1201,2503,2504],{"class":1276}," rank",[1201,2506,1129],{"class":1211},[1201,2508,2202],{"class":1376},[1201,2510,2511],{"class":1447},"     \u002F\u002F 1-based position, monotonic with score order\n",[1201,2513,2514,2516,2519,2521,2523],{"class":1203,"line":1293},[1201,2515,2183],{"class":1251},[1201,2517,2518],{"class":1276}," field",[1201,2520,1129],{"class":1211},[1201,2522,1387],{"class":1376},[1201,2524,2525],{"class":1447},"    \u002F\u002F winning field (highest per-field BM25)\n",[1201,2527,2528,2530,2533,2535,2537],{"class":1203,"line":1310},[1201,2529,2183],{"class":1251},[1201,2531,2532],{"class":1276}," snippet",[1201,2534,1129],{"class":1211},[1201,2536,1387],{"class":1376},[1201,2538,2539],{"class":1447},"  \u002F\u002F ±window chars around the best match\n",[1201,2541,2542,2544,2547,2549,2551],{"class":1203,"line":1325},[1201,2543,2183],{"class":1251},[1201,2545,2546],{"class":1276}," locale",[1201,2548,2042],{"class":1211},[1201,2550,1387],{"class":1376},[1201,2552,2553],{"class":1447},"  \u002F\u002F set for i18n-text and dictionary-key hits\n",[1201,2555,2556,2558,2560,2562,2565],{"class":1203,"line":1334},[1201,2557,2183],{"class":1251},[1201,2559,2212],{"class":1276},[1201,2561,2042],{"class":1211},[1201,2563,2564],{"class":1376}," T",[1201,2566,2567],{"class":1447},"       \u002F\u002F only when includeRecord: true\n",[1201,2569,2570],{"class":1203,"line":1365},[1201,2571,2222],{"class":1211},[942,2573,2574,2577,2578,2584],{},[961,2575,2576],{},"rank"," matters beyond display order: it's what ",[957,2579,2581],{"href":2580},"\u002Fservices\u002Fembeddings#fuseretrievallists-opts-the-fusion-primitive-standalone",[961,2582,2583],{},"fuseRetrieval"," uses to combine ranked lists (from different retrieval modes, or from different vaults) without comparing raw scores across lists that aren't on the same scale.",[1554,2586,2588],{"id":2587},"textindexes",[961,2589,1133],{},[1192,2591,2593],{"className":1194,"code":2592,"language":1196,"meta":1197,"style":1197},"vault.collection\u003CInvoice>('invoices', {\n  textIndexes: ['title', 'notes', 'category', 'attachmentName'],\n  warmIndexOnOpen: true,   \u002F\u002F auto-build on collection open\n})\n",[961,2594,2595,2622,2666,2680],{"__ignoreMap":1197},[1201,2596,2597,2600,2602,2604,2606,2608,2610,2612,2614,2616,2618,2620],{"class":1203,"line":1204},[1201,2598,2599],{"class":1215},"vault",[1201,2601,1157],{"class":1211},[1201,2603,1472],{"class":1264},[1201,2605,1475],{"class":1211},[1201,2607,1478],{"class":1376},[1201,2609,1481],{"class":1211},[1201,2611,1267],{"class":1215},[1201,2613,1287],{"class":1211},[1201,2615,1488],{"class":1234},[1201,2617,1287],{"class":1211},[1201,2619,1219],{"class":1211},[1201,2621,1495],{"class":1211},[1201,2623,2624,2626,2628,2630,2632,2634,2636,2638,2640,2643,2645,2647,2649,2652,2654,2656,2658,2660,2662,2664],{"class":1203,"line":1241},[1201,2625,1501],{"class":1276},[1201,2627,1129],{"class":1211},[1201,2629,1506],{"class":1215},[1201,2631,1287],{"class":1211},[1201,2633,1511],{"class":1234},[1201,2635,1287],{"class":1211},[1201,2637,1219],{"class":1211},[1201,2639,1231],{"class":1211},[1201,2641,2642],{"class":1234},"notes",[1201,2644,1287],{"class":1211},[1201,2646,1219],{"class":1211},[1201,2648,1231],{"class":1211},[1201,2650,2651],{"class":1234},"category",[1201,2653,1287],{"class":1211},[1201,2655,1219],{"class":1211},[1201,2657,1231],{"class":1211},[1201,2659,1529],{"class":1234},[1201,2661,1287],{"class":1211},[1201,2663,1534],{"class":1215},[1201,2665,1290],{"class":1211},[1201,2667,2668,2671,2673,2675,2677],{"class":1203,"line":1248},[1201,2669,2670],{"class":1276},"  warmIndexOnOpen",[1201,2672,1129],{"class":1211},[1201,2674,1711],{"class":1710},[1201,2676,1219],{"class":1211},[1201,2678,2679],{"class":1447},"   \u002F\u002F auto-build on collection open\n",[1201,2681,2682,2684],{"class":1203,"line":1273},[1201,2683,1328],{"class":1211},[1201,2685,1331],{"class":1215},[942,2687,2688,2689,2692,2693,2695,2696,2698,2699,2701],{},"An ",[952,2690,2691],{},"opt-in allowlist"," of field paths (supports nested paths and ",[961,2694,2062],{},"-wildcard arrays). Only fields in this list enter the index — collections with no ",[961,2697,1133],{}," pay zero overhead, and ",[961,2700,980],{}," throws without one.",[1554,2703,2705],{"id":2704},"collectionwarmindex",[961,2706,1182],{},[1192,2708,2710],{"className":1194,"code":2709,"language":1196,"meta":1197,"style":1197},"warmIndex(): Promise\u003Cvoid>\n",[961,2711,2712],{"__ignoreMap":1197},[1201,2713,2714,2717,2720,2722],{"class":1203,"line":1204},[1201,2715,2716],{"class":1264},"warmIndex",[1201,2718,2719],{"class":1215},"(): ",[1201,2721,2048],{"class":1376},[1201,2723,2724],{"class":1211},"\u003Cvoid>\n",[942,2726,2727,2728,2730,2731,2739,2740,1157],{},"Pre-builds the lexical index instead of paying the build cost on the first ",[961,2729,980],{},". See ",[957,2732,2734,1084,2736],{"href":2733},"#warmindex-and-warmindexonopen",[961,2735,1128],{},[961,2737,2738],{},"warmIndexOnOpen"," below for its exact behavior in lazy mode and with no ",[961,2741,1133],{},[1554,2743,2745],{"id":2744},"collectionflushindex",[961,2746,1186],{},[1192,2748,2750],{"className":1194,"code":2749,"language":1196,"meta":1197,"style":1197},"flushIndex(): Promise\u003Cvoid>\n",[961,2751,2752],{"__ignoreMap":1197},[1201,2753,2754,2757,2759,2761],{"class":1203,"line":1204},[1201,2755,2756],{"class":1264},"flushIndex",[1201,2758,2719],{"class":1215},[1201,2760,2048],{"class":1376},[1201,2762,2724],{"class":1211},[942,2764,2765,2766,2769,2770,1800],{},"Force-persists the in-memory index immediately. Only meaningful with ",[961,2767,2768],{},"textIndexPersist: true"," — a no-op otherwise. See ",[957,2771,2773],{"href":2772},"#session-local-by-default-or-persisted-with-textindexpersist","persistence",[1554,2775,2777],{"id":2776},"other-exports","Other exports",[1013,2779,2780,2792,2827,2840],{},[1016,2781,2782,2787,2788,2791],{},[952,2783,2784],{},[961,2785,2786],{},"SearchEntry\u003CT>"," — the ",[961,2789,2790],{},"{ id, record }"," input-entry shape scan mode builds internally from the eager cache before scoring; not something you construct yourself.",[1016,2793,2794,2799,2800,2802,2803,1174,2805,1174,2807,1174,2810,1174,2812,1174,2814,2817,2818,2820,2821,2824,2825,1157],{},[952,2795,2796],{},[961,2797,2798],{},"SearchStrategy"," — the interface ",[961,2801,963],{}," implements (",[961,2804,1587],{},[961,2806,1858],{},[961,2808,2809],{},"similarTo",[961,2811,2716],{},[961,2813,2756],{},[961,2815,2816],{},"embedOnWrite","). Advanced\u002Finternal: most code never touches it directly, it just passes ",[961,2819,963],{}," as ",[961,2822,2823],{},"searchStrategy"," to ",[961,2826,1170],{},[1016,2828,2829,2834,2835,2837,2838,1157],{},[952,2830,2831],{},[961,2832,2833],{},"NO_SEARCH"," — the disabled-sentinel ",[961,2836,2798],{}," every collection uses until you opt in; every method on it throws ",[961,2839,1190],{},[1016,2841,2842,2847,2848,2850,2851,2854,2855,2858,2859,2862,2863,1157],{},[952,2843,2844],{},[961,2845,2846],{},"tokenize(text)"," — the standalone scan-mode tokenizer ",[961,2849,976],{}," uses internally (NFKC-normalize, lowercase, split on Unicode letter\u002Fnumber runs — no ",[961,2852,2853],{},"Intl.Segmenter",", so it does ",[952,2856,2857],{},"not"," word-segment Thai\u002FCJK): ",[961,2860,2861],{},"tokenize('Hello World')"," → ",[961,2864,2865],{},"['hello', 'world']",[998,2867,2869],{"id":2868},"field-type-matrix","Field-type matrix",[2079,2871,2872,2888],{},[2082,2873,2874],{},[2085,2875,2876,2879,2885],{},[2088,2877,2878],{},"Field type",[2088,2880,2881,2882,2884],{},"Indexed by ",[961,2883,980],{},"?",[2088,2886,2887],{},"How",[2098,2889,2890,2903,2923,2941,2962,2987],{},[2085,2891,2892,2897,2900],{},[2103,2893,2894],{},[961,2895,2896],{},"string",[2103,2898,2899],{},"Yes",[2103,2901,2902],{},"Tokenized directly",[2085,2904,2905,2914,2916],{},[2103,2906,2907,1091,2910,2913],{},[961,2908,2909],{},"i18nText",[961,2911,2912],{},"{[locale]:string}",")",[2103,2915,2899],{},[2103,2917,2918,2919,2922],{},"All locale values indexed; hit carries the matched ",[961,2920,2921],{},"locale","; search is locale-agnostic",[2085,2924,2925,2931,2934],{},[2103,2926,2927,2930],{},[961,2928,2929],{},"dictKey"," label",[2103,2932,2933],{},"Yes, opt-in",[2103,2935,2936,2937,2940],{},"Resolved labels (all locales) from the dictionary; the opaque key itself is not text-indexed — use ",[961,2938,2939],{},"where()"," for key equality",[2085,2942,2943,2949,2952],{},[2103,2944,2945,2946],{},"Blob field — ",[961,2947,2948],{},"filename",[2103,2950,2951],{},"Yes (heaviest, indexed last)",[2103,2953,2954,2955,1091,2958,2961],{},"Slot metadata via the blob facade's ",[961,2956,2957],{},"list()",[961,2959,2960],{},"blob(recordId).list()","), one async lookup per record against the separate blob collection; file bytes are never tokenized",[2085,2963,2964,2977,2980],{},[2103,2965,2966,1125,2968,1125,2971,1125,2974],{},[961,2967,760],{},[961,2969,2970],{},"number",[961,2972,2973],{},"date",[961,2975,2976],{},"boolean",[2103,2978,2979],{},"No, by design",[2103,2981,2982,2983,2986],{},"Use ",[961,2984,2985],{},"where('amount', '>', 1000)"," — text-formatting variance makes full-text matching wrong for these",[2085,2988,2989,2996,2999],{},[2103,2990,2991,2992,2995],{},"Blob ",[952,2993,2994],{},"content"," (PDF \u002F image bytes)",[2103,2997,2998],{},"No, out of scope",[2103,3000,3001,3002,3004],{},"Extract text into a ",[961,3003,2896],{}," field yourself (OCR \u002F PDF→text) — that field then indexes normally",[942,3006,3007],{},[952,3008,3009,3010,1084,3012,1129],{},"Combining ",[961,3011,980],{},[961,3013,2939],{},[1192,3015,3017],{"className":1194,"code":3016,"language":1196,"meta":1197,"style":1197},"const textHits = new Set((await invoices.retrieve('overdue')).map((h) => h.id))\nconst rows = invoices.query().where('amount', '>', 1000).run()\nconst combined = rows.filter((r) => textHits.has(r.id))\n",[961,3018,3019,3082,3137],{"__ignoreMap":1197},[1201,3020,3021,3023,3026,3028,3031,3034,3037,3039,3041,3043,3045,3047,3049,3051,3053,3056,3058,3061,3063,3065,3069,3071,3074,3077,3079],{"class":1203,"line":1204},[1201,3022,1252],{"class":1251},[1201,3024,3025],{"class":1215}," textHits ",[1201,3027,1258],{"class":1211},[1201,3029,3030],{"class":1211}," new",[1201,3032,3033],{"class":1264}," Set",[1201,3035,3036],{"class":1215},"((",[1201,3038,1620],{"class":1207},[1201,3040,1582],{"class":1215},[1201,3042,1157],{"class":1211},[1201,3044,1858],{"class":1264},[1201,3046,1267],{"class":1215},[1201,3048,1287],{"class":1211},[1201,3050,1974],{"class":1234},[1201,3052,1287],{"class":1211},[1201,3054,3055],{"class":1215},"))",[1201,3057,1157],{"class":1211},[1201,3059,3060],{"class":1264},"map",[1201,3062,1267],{"class":1215},[1201,3064,1267],{"class":1211},[1201,3066,3068],{"class":3067},"sHdIc","h",[1201,3070,2913],{"class":1211},[1201,3072,3073],{"class":1251}," =>",[1201,3075,3076],{"class":1215}," h",[1201,3078,1157],{"class":1211},[1201,3080,3081],{"class":1215},"id))\n",[1201,3083,3084,3086,3089,3091,3093,3095,3098,3100,3102,3105,3107,3109,3112,3114,3116,3118,3120,3122,3124,3127,3129,3131,3134],{"class":1203,"line":1241},[1201,3085,1252],{"class":1251},[1201,3087,3088],{"class":1215}," rows ",[1201,3090,1258],{"class":1211},[1201,3092,1582],{"class":1215},[1201,3094,1157],{"class":1211},[1201,3096,3097],{"class":1264},"query",[1201,3099,1320],{"class":1215},[1201,3101,1157],{"class":1211},[1201,3103,3104],{"class":1264},"where",[1201,3106,1267],{"class":1215},[1201,3108,1287],{"class":1211},[1201,3110,3111],{"class":1234},"amount",[1201,3113,1287],{"class":1211},[1201,3115,1219],{"class":1211},[1201,3117,1231],{"class":1211},[1201,3119,1481],{"class":1234},[1201,3121,1287],{"class":1211},[1201,3123,1219],{"class":1211},[1201,3125,3126],{"class":1763}," 1000",[1201,3128,2913],{"class":1215},[1201,3130,1157],{"class":1211},[1201,3132,3133],{"class":1264},"run",[1201,3135,3136],{"class":1215},"()\n",[1201,3138,3139,3141,3144,3146,3149,3151,3154,3156,3158,3161,3163,3165,3168,3170,3173,3176,3178],{"class":1203,"line":1248},[1201,3140,1252],{"class":1251},[1201,3142,3143],{"class":1215}," combined ",[1201,3145,1258],{"class":1211},[1201,3147,3148],{"class":1215}," rows",[1201,3150,1157],{"class":1211},[1201,3152,3153],{"class":1264},"filter",[1201,3155,1267],{"class":1215},[1201,3157,1267],{"class":1211},[1201,3159,3160],{"class":3067},"r",[1201,3162,2913],{"class":1211},[1201,3164,3073],{"class":1251},[1201,3166,3167],{"class":1215}," textHits",[1201,3169,1157],{"class":1211},[1201,3171,3172],{"class":1264},"has",[1201,3174,3175],{"class":1215},"(r",[1201,3177,1157],{"class":1211},[1201,3179,3081],{"class":1215},[942,3181,1267,3182,3185],{},[961,3183,3184],{},"RetrieveOptions.within"," does the same intersection in one call — see the table above.)",[998,3187,3189,3190],{"id":3188},"i18n-tokenizer-intlsegmenter","i18n tokenizer — ",[961,3191,2853],{},[942,3193,3194,3195,1091,3199,3202],{},"The lexical index's tokenizer uses ",[952,3196,3197],{},[961,3198,2853],{},[961,3200,3201],{},"granularity: 'word'","), then NFKC-normalizes, lowercases, and keeps only word-like segments. This correctly segments Thai, CJK, and other scripts written without inter-word spaces — a run of Thai text is split into individual words instead of collapsing into one token.",[942,3204,3205,3206,3209],{},"A custom tokenizer is pluggable via the ",[961,3207,3208],{},"Tokenizer"," type:",[1192,3211,3213],{"className":1194,"code":3212,"language":1196,"meta":1197,"style":1197},"import type { Tokenizer } from '@noy-db\u002Fhub'\n\u002F\u002F Tokenizer = (text: string) => string[]\n",[961,3214,3215,3237],{"__ignoreMap":1197},[1201,3216,3217,3219,3222,3224,3227,3229,3231,3233,3235],{"class":1203,"line":1204},[1201,3218,1208],{"class":1207},[1201,3220,3221],{"class":1207}," type",[1201,3223,1212],{"class":1211},[1201,3225,3226],{"class":1215}," Tokenizer",[1201,3228,1225],{"class":1211},[1201,3230,1228],{"class":1207},[1201,3232,1231],{"class":1211},[1201,3234,1235],{"class":1234},[1201,3236,1238],{"class":1211},[1201,3238,3239],{"class":1203,"line":1241},[1201,3240,3241],{"class":1447},"\u002F\u002F Tokenizer = (text: string) => string[]\n",[942,3243,3244,3246,3247,3249,3250,1157],{},[961,3245,976],{},"'s scan-mode tokenizer is simpler — NFKC-normalize, lowercase, split on Unicode letter\u002Fnumber runs, no ",[961,3248,2853],{}," — so for Thai\u002FCJK fields prefer ",[961,3251,980],{},[998,3253,3255,1084,3257],{"id":3254},"warmindex-and-warmindexonopen",[961,3256,1128],{},[961,3258,2738],{},[942,3260,3261,3262,3265,3266,3268],{},"The index is ",[952,3263,3264],{},"lazy by default"," — built on the first ",[961,3267,980],{}," call. To pre-build it:",[1192,3270,3272],{"className":1194,"code":3271,"language":1196,"meta":1197,"style":1197},"\u002F\u002F On-demand pre-build:\nawait invoices.warmIndex()\n\n\u002F\u002F Auto-build on collection open (set in collection options):\nvault.collection\u003CInvoice>('invoices', {\n  textIndexes: ['title'],\n  warmIndexOnOpen: true,\n})\n",[961,3273,3274,3279,3291,3295,3300,3326,3344,3354],{"__ignoreMap":1197},[1201,3275,3276],{"class":1203,"line":1204},[1201,3277,3278],{"class":1447},"\u002F\u002F On-demand pre-build:\n",[1201,3280,3281,3283,3285,3287,3289],{"class":1203,"line":1241},[1201,3282,1620],{"class":1207},[1201,3284,1582],{"class":1215},[1201,3286,1157],{"class":1211},[1201,3288,2716],{"class":1264},[1201,3290,3136],{"class":1215},[1201,3292,3293],{"class":1203,"line":1248},[1201,3294,1245],{"emptyLinePlaceholder":1244},[1201,3296,3297],{"class":1203,"line":1273},[1201,3298,3299],{"class":1447},"\u002F\u002F Auto-build on collection open (set in collection options):\n",[1201,3301,3302,3304,3306,3308,3310,3312,3314,3316,3318,3320,3322,3324],{"class":1203,"line":1293},[1201,3303,2599],{"class":1215},[1201,3305,1157],{"class":1211},[1201,3307,1472],{"class":1264},[1201,3309,1475],{"class":1211},[1201,3311,1478],{"class":1376},[1201,3313,1481],{"class":1211},[1201,3315,1267],{"class":1215},[1201,3317,1287],{"class":1211},[1201,3319,1488],{"class":1234},[1201,3321,1287],{"class":1211},[1201,3323,1219],{"class":1211},[1201,3325,1495],{"class":1211},[1201,3327,3328,3330,3332,3334,3336,3338,3340,3342],{"class":1203,"line":1310},[1201,3329,1501],{"class":1276},[1201,3331,1129],{"class":1211},[1201,3333,1506],{"class":1215},[1201,3335,1287],{"class":1211},[1201,3337,1511],{"class":1234},[1201,3339,1287],{"class":1211},[1201,3341,1534],{"class":1215},[1201,3343,1290],{"class":1211},[1201,3345,3346,3348,3350,3352],{"class":1203,"line":1325},[1201,3347,2670],{"class":1276},[1201,3349,1129],{"class":1211},[1201,3351,1711],{"class":1710},[1201,3353,1290],{"class":1211},[1201,3355,3356,3358],{"class":1203,"line":1334},[1201,3357,1328],{"class":1211},[1201,3359,1331],{"class":1215},[942,3361,3362,3364,3365,3367,3368,3370,3371,3373,3374,3379],{},[961,3363,1128],{}," on a ",[952,3366,719],{}," collection (",[961,3369,1101],{},") throws — pre-building requires eager mode. ",[961,3372,1128],{}," on a collection with ",[952,3375,3376,3377],{},"no ",[961,3378,1133],{}," configured is a silent no-op instead: there's no index to build, so it returns immediately without throwing and without building anything.",[998,3381,3383,3384],{"id":3382},"session-local-by-default-or-persisted-with-textindexpersist","Session-local by default, or persisted with ",[961,3385,3386],{},"textIndexPersist",[942,3388,3389,3390,3393],{},"The lexical index is ",[952,3391,3392],{},"session-scoped and in-memory"," unless you opt into persistence:",[1013,3395,3396,3399,3406,3414],{},[1016,3397,3398],{},"It's built from the already-decrypted eager cache — no extra store reads.",[1016,3400,3401,3402,3405],{},"By default it's ",[952,3403,3404],{},"never written to the store"," — zero added leakage.",[1016,3407,3408,3409,1125,3411,3413],{},"On a new session it rebuilds on the first ",[961,3410,980],{},[961,3412,1128],{}," call.",[1016,3415,3416,3417,1125,3420,3423,3424,3427,3428,3430],{},"A write (",[961,3418,3419],{},"put",[961,3421,3422],{},"delete",") marks the index ",[952,3425,3426],{},"dirty","; the next ",[961,3429,980],{}," triggers a full rebuild.",[942,3432,3433,3434,3436],{},"Set ",[961,3435,2768],{}," to keep the index warm across sessions and devices instead of rebuilding it every time:",[1192,3438,3440],{"className":1194,"code":3439,"language":1196,"meta":1197,"style":1197},"const persisted = vault.collection\u003CInvoice>('invoices', {\n  textIndexes: ['title', 'notes'],\n  textIndexPersist: true,   \u002F\u002F persist the index as an opaque encrypted blob\n  warmIndexOnOpen: true,    \u002F\u002F combine with warm load for an instant first retrieve()\n})\n",[961,3441,3442,3475,3501,3515,3528],{"__ignoreMap":1197},[1201,3443,3444,3446,3449,3451,3453,3455,3457,3459,3461,3463,3465,3467,3469,3471,3473],{"class":1203,"line":1204},[1201,3445,1252],{"class":1251},[1201,3447,3448],{"class":1215}," persisted ",[1201,3450,1258],{"class":1211},[1201,3452,1467],{"class":1215},[1201,3454,1157],{"class":1211},[1201,3456,1472],{"class":1264},[1201,3458,1475],{"class":1211},[1201,3460,1478],{"class":1376},[1201,3462,1481],{"class":1211},[1201,3464,1267],{"class":1215},[1201,3466,1287],{"class":1211},[1201,3468,1488],{"class":1234},[1201,3470,1287],{"class":1211},[1201,3472,1219],{"class":1211},[1201,3474,1495],{"class":1211},[1201,3476,3477,3479,3481,3483,3485,3487,3489,3491,3493,3495,3497,3499],{"class":1203,"line":1241},[1201,3478,1501],{"class":1276},[1201,3480,1129],{"class":1211},[1201,3482,1506],{"class":1215},[1201,3484,1287],{"class":1211},[1201,3486,1511],{"class":1234},[1201,3488,1287],{"class":1211},[1201,3490,1219],{"class":1211},[1201,3492,1231],{"class":1211},[1201,3494,2642],{"class":1234},[1201,3496,1287],{"class":1211},[1201,3498,1534],{"class":1215},[1201,3500,1290],{"class":1211},[1201,3502,3503,3506,3508,3510,3512],{"class":1203,"line":1248},[1201,3504,3505],{"class":1276},"  textIndexPersist",[1201,3507,1129],{"class":1211},[1201,3509,1711],{"class":1710},[1201,3511,1219],{"class":1211},[1201,3513,3514],{"class":1447},"   \u002F\u002F persist the index as an opaque encrypted blob\n",[1201,3516,3517,3519,3521,3523,3525],{"class":1203,"line":1273},[1201,3518,2670],{"class":1276},[1201,3520,1129],{"class":1211},[1201,3522,1711],{"class":1710},[1201,3524,1219],{"class":1211},[1201,3526,3527],{"class":1447},"    \u002F\u002F combine with warm load for an instant first retrieve()\n",[1201,3529,3530,3532],{"class":1203,"line":1293},[1201,3531,1328],{"class":1211},[1201,3533,1331],{"class":1215},[942,3535,3536,3537,1129],{},"With ",[961,3538,2768],{},[1013,3540,3541,3559,3575,3582,3607,3617],{},[1016,3542,3543,3544,3550,3551,3554,3555,3558],{},"The in-memory index is serialized and ",[952,3545,3546,3547],{},"encrypted under the collection's ",[957,3548,3549],{"href":66},"DEK"," — the same key that encrypts every record body. The store sees ",[952,3552,3553],{},"one opaque ciphertext blob"," at ",[961,3556,3557],{},"_ftindex\u002F\u003Ccollection>",": no terms, postings, or plaintext, and no per-term addressability the way a store-side term index would have.",[1016,3560,3561,3562,1125,3564,3566,3567,3570,3571,3574],{},"On the next ",[961,3563,980],{},[961,3565,1128],{}," in a new session, the blob is loaded and checked against a fingerprint (",[961,3568,3569],{},"{ count, maxVersion }"," derived cheaply from the eager cache: record count, and the highest ",[961,3572,3573],{},"_v"," version stamp across all records). A matching fingerprint means the blob is used as-is — a cold load with no re-tokenizing. A mismatch (a write happened on another device or tab) triggers a rebuild and re-persist.",[1016,3576,3577,3578,3581],{},"Writes mark the index dirty and schedule a ",[952,3579,3580],{},"debounced flush"," (about one second after the last write by default) — typically one blob write per burst of writes, not one per record.",[1016,3583,3584,3589,3590],{},[952,3585,3586],{},[961,3587,3588],{},"flushIndex()"," force-persists the index immediately — call it before saving a checkpoint or before a known idle window:",[1192,3591,3593],{"className":1194,"code":3592,"language":1196,"meta":1197,"style":1197},"await invoices.flushIndex()\n",[961,3594,3595],{"__ignoreMap":1197},[1201,3596,3597,3599,3601,3603,3605],{"class":1203,"line":1204},[1201,3598,1620],{"class":1207},[1201,3600,1582],{"class":1215},[1201,3602,1157],{"class":1211},[1201,3604,2756],{"class":1264},[1201,3606,3136],{"class":1215},[1016,3608,3609,3612,3613,3616],{},[952,3610,3611],{},"Close-flush",": ",[961,3614,3615],{},"db.close()"," triggers a best-effort flush of any pending dirty index, so the next session opens against the freshest blob.",[1016,3618,3619,3612,3625,3628,3629,3632,3633,3636,3637,3639,3640,3642],{},[952,3620,3621,3624],{},[961,3622,3623],{},"forget()"," teardown",[961,3626,3627],{},"vault.forget(subject)"," ",[957,3630,3631],{"href":686},"crypto-shreds"," matching records and also deletes the ",[961,3634,3635],{},"_ftindex"," blob, because the blob is encrypted under the same collection DEK and would otherwise still decrypt the forgotten subject's indexed terms. The next ",[961,3638,980],{}," rebuilds from the post-forget record set. If the blob couldn't be deleted (for example, the store is offline at shred time), that's reported as residue in the ",[961,3641,3623],{}," return value — the same residue-tracking pattern used for the record-level index side-cars.",[942,3644,3645,3646,3649],{},"Persistence adds no leakage beyond the size of that one blob: the store can't distinguish an index write from a record write by its content, the fingerprint itself lives inside the encrypted envelope, and a collection with ",[961,3647,3648],{},"textIndexPersist: false"," (the default) writes nothing extra at all.",[998,3651,3653],{"id":3652},"limits-gotchas","Limits & gotchas",[2079,3655,3656,3666],{},[2082,3657,3658],{},[2085,3659,3660,3663],{},[2088,3661,3662],{},"Situation",[2088,3664,3665],{},"Behavior",[2098,3667,3668,3692,3712,3725,3737,3749,3773],{},[2085,3669,3670,3678],{},[2103,3671,3672,3675,3676],{},[961,3673,3674],{},"searchStrategy: withSearch()"," not passed to ",[961,3677,1170],{},[2103,3679,3680,1174,3682,1174,3684,1174,3686,1174,3688,1187,3690],{},[961,3681,1587],{},[961,3683,1858],{},[961,3685,2809],{},[961,3687,2716],{},[961,3689,2756],{},[961,3691,1190],{},[2085,3693,3694,3699],{},[2103,3695,3696,3697,2913],{},"Collection is lazy (",[961,3698,1101],{},[2103,3700,3701,1084,3703,3705,3706,3708,3709,3711],{},[961,3702,976],{},[961,3704,980],{}," always throw; ",[961,3707,1128],{}," throws too, but only when ",[961,3710,1133],{}," is configured (see next row)",[2085,3713,3714,3722],{},[2103,3715,3716,3718,3719,3721],{},[961,3717,980],{}," called with no ",[961,3720,1133],{}," configured",[2103,3723,3724],{},"Throws immediately",[2085,3726,3727,3734],{},[2103,3728,3729,3731,3732,3721],{},[961,3730,1128],{}," on a collection with no ",[961,3733,1133],{},[2103,3735,3736],{},"Silent no-op — nothing to build, resolves without error, even in lazy mode",[2085,3738,3739,3746],{},[2103,3740,3741,3742,3745],{},"Two corpora share the same ",[961,3743,3744],{},"{count, maxVersion}"," fingerprint by coincidence",[2103,3747,3748],{},"The stale blob is used as-is (best-effort staleness check) — rare in practice, since almost every write changes at least one of the two values",[2085,3750,3751,3764],{},[2103,3752,3753,1125,3755,1125,3757,1125,3759,3761,3762],{},[961,3754,760],{},[961,3756,2970],{},[961,3758,2973],{},[961,3760,2976],{}," fields in ",[961,3763,1133],{},[2103,3765,3766,3767,3769,3770,3772],{},"Not matched by ",[961,3768,980],{}," — use ",[961,3771,2939],{}," for those",[2085,3774,3775,3778],{},[2103,3776,3777],{},"Blob content (file bytes)",[2103,3779,3780,3781,3783],{},"Never tokenized — extract text into a ",[961,3782,2896],{}," field first",[998,3785,3787],{"id":3786},"see-also","See also",[1013,3789,3790,3812,3827,3833,3839,3844],{},[1016,3791,3792,3794,3795,3798,3799,3802,3803,1183,3805,3808,3809,3811],{},[957,3793,673],{"href":674}," — semantic (",[961,3796,3797],{},"mode: 'semantic'",") and hybrid (",[961,3800,3801],{},"mode: 'hybrid'",") retrieval, ",[961,3804,995],{},[961,3806,3807],{},"fuseRetrieval()",", all part of the same ",[961,3810,963],{}," opt-in.",[1016,3813,3814,2787,3817,3819,3820,1174,3822,1183,3824,3826],{},[957,3815,3816],{"href":720},"Lazy",[961,3818,1101],{}," mode that ",[961,3821,976],{},[961,3823,980],{},[961,3825,1128],{}," all throw under.",[1016,3828,3829,3832],{},[957,3830,3831],{"href":813},"Satellites"," — split large non-searched fields off the decrypt path that scan mode reads.",[1016,3834,3835,3838],{},[957,3836,3837],{"href":686},"Forget"," — the erasure path this page's persisted-index teardown plugs into.",[1016,3840,3841,3843],{},[957,3842,21],{"href":66}," — the collection DEK that encrypts the persisted index blob.",[1016,3845,3846,3847,1174,3855,1183,3862,1157],{},"Proven by showcases ",[957,3848,3852],{"href":3849,"rel":3850},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F111-scan-search.showcase.test.ts",[3851],"nofollow",[961,3853,3854],{},"111-scan-search",[957,3856,3859],{"href":3857,"rel":3858},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F122-with-retrieve.showcase.test.ts",[3851],[961,3860,3861],{},"122-with-retrieve",[957,3863,3866],{"href":3864,"rel":3865},"https:\u002F\u002Fgithub.com\u002Fnoy-db\u002Fdocs\u002Fblob\u002Fmain\u002Fshowcases\u002Fsrc\u002F123-persisted-index.showcase.test.ts",[3851],[961,3867,3868],{},"123-persisted-index",[3870,3871,3872],"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 .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}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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}",{"title":1197,"searchDepth":1248,"depth":1248,"links":3874},[3875,3876,3877,3878,3884,3892,3893,3895,3897,3899,3900],{"id":1000,"depth":1241,"text":1001},{"id":1105,"depth":1241,"text":1106},{"id":1160,"depth":1241,"text":1161},{"id":1551,"depth":1241,"text":1552,"children":3879},[3880,3882],{"id":1556,"depth":1248,"text":3881},"collection.search(field, query, opts) — scan mode",{"id":1803,"depth":1248,"text":3883},"collection.retrieve(query, opts) — lexical index",{"id":2004,"depth":1241,"text":1799,"children":3885},[3886,3887,3888,3889,3890,3891],{"id":2007,"depth":1248,"text":2010},{"id":2225,"depth":1248,"text":2228},{"id":2587,"depth":1248,"text":1133},{"id":2704,"depth":1248,"text":1182},{"id":2744,"depth":1248,"text":1186},{"id":2776,"depth":1248,"text":2777},{"id":2868,"depth":1241,"text":2869},{"id":3188,"depth":1241,"text":3894},"i18n tokenizer — Intl.Segmenter",{"id":3254,"depth":1241,"text":3896},"warmIndex() and warmIndexOnOpen",{"id":3382,"depth":1241,"text":3898},"Session-local by default, or persisted with textIndexPersist",{"id":3652,"depth":1241,"text":3653},{"id":3786,"depth":1241,"text":3787},null,"Keyword lookup via `withSearch()`: zero-setup `search()` with BM25, or indexed `retrieve()` with ranking and snippets — all client-side after decryption.","md",{},"service",{"title":832,"description":3902},"experimental","full-text scan and lexical retrieval","important","PdFQp_ffTr0WADJFvbR80OAxF0OiMM6YPhipWq7ZLig",{"data":3912,"body":3913},{},{"type":3914,"children":3915},"root",[3916],{"type":3917,"tag":942,"props":3918,"children":3919},"element",{},[3920],{"type":3917,"tag":961,"props":3921,"children":3923},{"className":3922},[],[3924],{"type":3925,"value":3926},"text","with-lookup",{"data":3928,"body":3929},{},{"type":3914,"children":3930},[3931],{"type":3917,"tag":942,"props":3932,"children":3933},{},[3934,3939],{"type":3917,"tag":961,"props":3935,"children":3937},{"className":3936},[],[3938],{"type":3925,"value":1235},{"type":3925,"value":3940}," (root export — no separate subpath)",{"data":3942,"body":3943},{},{"type":3914,"children":3944},[3945],{"type":3917,"tag":942,"props":3946,"children":3947},{},[3948],{"type":3917,"tag":961,"props":3949,"children":3951},{"className":3950},[],[3952],{"type":3925,"value":963},1791896583048]