[{"data":1,"prerenderedAt":1120},["ShallowReactive",2],{"navigation":3,"\u002Fsearch\u002Fyour-own-client":173,"\u002Fsearch\u002Fyour-own-client-surround":1115},[4,27,69,103,113,135],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting Started","i-heroicons-star","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"Upgrade guide","\u002Fgetting-started\u002Fupgrade-guide","1.getting-started\u002F5.upgrade-guide",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Essentials","i-heroicons-shield-check","\u002Fessentials","2.essentials",[33,37,41,45,49,53,57,61,65],{"title":34,"path":35,"stem":36},"Controls","\u002Fessentials\u002Fcontrols","2.essentials\u002F1.controls",{"title":38,"path":39,"stem":40},"Perimeters","\u002Fessentials\u002Fperimeters","2.essentials\u002F2.perimeters",{"title":42,"path":43,"stem":44},"Perimeter classes","\u002Fessentials\u002Fperimeter-classes","2.essentials\u002F3.perimeter-classes",{"title":46,"path":47,"stem":48},"Levels","\u002Fessentials\u002Flevels","2.essentials\u002F4.levels",{"title":50,"path":51,"stem":52},"Boundaries","\u002Fessentials\u002Fboundaries","2.essentials\u002F5.boundaries",{"title":54,"path":55,"stem":56},"Parents","\u002Fessentials\u002Fparents","2.essentials\u002F6.parents",{"title":58,"path":59,"stem":60},"Policies","\u002Fessentials\u002Fpolicies","2.essentials\u002F7.policies",{"title":62,"path":63,"stem":64},"Queries","\u002Fessentials\u002Fqueries","2.essentials\u002F8.queries",{"title":66,"path":67,"stem":68},"Readers","\u002Fessentials\u002Freaders","2.essentials\u002F9.readers",{"title":70,"icon":71,"path":72,"stem":73,"children":74,"page":26},"Search","i-heroicons-magnifying-glass","\u002Fsearch","3.search",[75,79,83,87,91,95,99],{"title":76,"path":77,"stem":78},"Search overview","\u002Fsearch\u002Foverview","3.search\u002F1.overview",{"title":80,"path":81,"stem":82},"Engines","\u002Fsearch\u002Fengines","3.search\u002F2.engines",{"title":84,"path":85,"stem":86},"Keeping the keys fresh","\u002Fsearch\u002Fkeeping-the-keys-fresh","3.search\u002F3.keeping-the-keys-fresh",{"title":88,"path":89,"stem":90},"Exceptions and dates","\u002Fsearch\u002Fexceptions-and-dates","3.search\u002F4.exceptions-and-dates",{"title":92,"path":93,"stem":94},"Searching through a parent","\u002Fsearch\u002Fthrough-a-parent","3.search\u002F5.through-a-parent",{"title":96,"path":97,"stem":98},"Search from the browser","\u002Fsearch\u002Ffrom-the-browser","3.search\u002F6.from-the-browser",{"title":100,"path":101,"stem":102},"Your own search client","\u002Fsearch\u002Fyour-own-client","3.search\u002F7.your-own-client",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":26},"Integrations","i-heroicons-puzzle-piece","\u002Fintegrations","4.integrations",[109],{"title":110,"path":111,"stem":112},"laravel-rest-api","\u002Fintegrations\u002Flaravel-rest-api","4.integrations\u002F1.laravel-rest-api",{"title":114,"icon":115,"path":116,"stem":117,"children":118,"page":26},"Testing and Tooling","i-heroicons-wrench-screwdriver","\u002Ftesting-and-tooling","5.testing-and-tooling",[119,123,127,131],{"title":120,"path":121,"stem":122},"Testing","\u002Ftesting-and-tooling\u002Ftesting","5.testing-and-tooling\u002F1.testing",{"title":124,"path":125,"stem":126},"access:check","\u002Ftesting-and-tooling\u002Faccess-check","5.testing-and-tooling\u002F2.access-check",{"title":128,"path":129,"stem":130},"Cache and about","\u002Ftesting-and-tooling\u002Fcache-and-about","5.testing-and-tooling\u002F3.cache-and-about",{"title":132,"path":133,"stem":134},"Generators","\u002Ftesting-and-tooling\u002Fgenerators","5.testing-and-tooling\u002F4.generators",{"title":136,"icon":137,"path":138,"stem":139,"children":140,"page":26},"Digging Deeper","i-heroicons-list-bullet","\u002Fdigging-deeper","6.digging-deeper",[141,145,149,153,157,161,165,169],{"title":142,"path":143,"stem":144},"Abilities","\u002Fdigging-deeper\u002Fabilities","6.digging-deeper\u002F1.abilities",{"title":146,"path":147,"stem":148},"Kept decisions","\u002Fdigging-deeper\u002Fdecisions","6.digging-deeper\u002F2.decisions",{"title":150,"path":151,"stem":152},"Batched decisions","\u002Fdigging-deeper\u002Fbatched-decisions","6.digging-deeper\u002F3.batched-decisions",{"title":154,"path":155,"stem":156},"Row checks","\u002Fdigging-deeper\u002Frow-checks","6.digging-deeper\u002F4.row-checks",{"title":158,"path":159,"stem":160},"Several brands","\u002Fdigging-deeper\u002Fseveral-brands","6.digging-deeper\u002F5.several-brands",{"title":162,"path":163,"stem":164},"Row context","\u002Fdigging-deeper\u002Frow-context","6.digging-deeper\u002F6.row-context",{"title":166,"path":167,"stem":168},"What is public in 1.x","\u002Fdigging-deeper\u002Fpublic-api","6.digging-deeper\u002F7.public-api",{"title":170,"path":171,"stem":172},"Use with AI","\u002Fdigging-deeper\u002Fuse-with-ai","6.digging-deeper\u002F8.use-with-ai",{"id":174,"title":100,"body":175,"description":1107,"extension":1108,"links":1109,"meta":1110,"navigation":365,"path":101,"seo":1111,"sitemap":1112,"stem":102,"updatedAt":1113,"__hash__":1114},"docs\u002F3.search\u002F7.your-own-client.md",{"type":176,"value":177,"toc":1097},"minimark",[178,183,187,269,296,300,303,317,324,809,820,827,858,864,936,940,952,985,989,995,1041,1053,1057,1060,1084,1093],[179,180,182],"h2",{"id":181},"four-ways","Four ways",[184,185,186],"p",{},"An application that queries the engine with its own client keeps the access filter in one of four ways:",[188,189,190,203],"table",{},[191,192,193],"thead",{},[194,195,196,200],"tr",{},[197,198,199],"th",{},"You need",[197,201,202],{},"Use",[204,205,206,223,238,252],"tbody",{},[194,207,208,217],{},[209,210,211,212,216],"td",{},"A multi-search, a vector search or an option that Scout does not expose, on the index of a ",[213,214,215],"code",{},"ControlledSearchable"," model",[209,218,219,220],{},"A search callback: ",[213,221,222],{},"Post::search('budget', fn ($client, $query, $options) => ...)->controlled()",[194,224,225,228],{},[209,226,227],{},"A search that your server proxies for a front end",[209,229,230,237],{},[231,232,234],"a",{"href":233},"\u002Fsearch\u002Ffrom-the-browser#through-a-route-of-the-application",[213,235,236],{},"Access::guardSearch()"," in your route",[194,239,240,243],{},[209,241,242],{},"One index per model, written by your own client",[209,244,245,246],{},"A Scout engine of your application: a subclass of Scout's Algolia, Meilisearch, Typesense or Turbopuffer engine, or an engine passed to ",[231,247,249],{"href":248},"\u002Fsearch\u002Fengines#trusting-another-engine",[213,250,251],{},"Access::trustSearchEngine()",[194,253,254,257],{},[209,255,256],{},"An index that is not the index of one Scout model",[209,258,259],{},[231,260,262,265,266],{"href":261},"#an-index-of-your-own",[213,263,264],{},"Access::indexKeysOf()"," and ",[213,267,268],{},"Access::indexReaderKeys()",[270,271,272,276,287],"ul",{},[273,274,275],"li",{},"The options that a search callback receives hold the access filter of the reader for the index of this model: pass them on to your client, never rebuild them, and never apply them to another index, where keys of the same name may have another meaning. In a multi-search, each model takes the filter of its own search.",[273,277,278,279,282,283,286],{},"Never combine a filter of the package with yours by hand: ",[213,280,281],{},"filter()"," on a ",[231,284,285],{"href":97},"browser token"," is for logs and tests.",[273,288,289,290,265,292,295],{},"With your own Scout engine, the documents, their freshness, ",[213,291,124],{},[213,293,294],{},"assertSearchAgrees()"," follow as for any engine.",[179,297,299],{"id":298},"an-index-of-your-own","An index of your own",[184,301,302],{},"An index that is not the index of one Scout model, such as a collection shared by several models, chunks of documents for a semantic search or an ingestion pipeline, takes its values from two read-only methods:",[270,304,305,311],{},[273,306,307,310],{},[213,308,309],{},"Access::indexKeysOf($rows)"," gives the values to store on the documents of each row;",[273,312,313,316],{},[213,314,315],{},"Access::indexReaderKeys($reader, $model)"," gives the values that the search of a reader filters on.",[184,318,319,320,323],{},"A common use keeps the list in SQL with ",[213,321,322],{},"controlledFor()"," and asks the engine only for the rows that their content finds, filtered by the keys of the reader so that the documents the reader may not view do not take the top results:",[325,326,331],"pre",{"className":327,"code":328,"language":329,"meta":330,"style":330},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Lomkit\\Access\\Access;\n\n\u002F\u002F Indexing: the rows of one model at a time\n$posts = Post::query()->whereKey($ids)->get();\n\nforeach (Access::indexKeysOf($posts) as $id => $keys) {\n    foreach ($chunks[$id] as $chunk) {\n        $index->upsert([...$chunk, '_access' => $keys['_access'], '_boundary' => $keys['_boundary']]);\n    }\n}\n\n\u002F\u002F Searching\n$keys = Access::indexReaderKeys($request->user(), Post::class);\n\nif ($keys->isClosed()) {\n    return [];\n}\n\n$hits = $index->search($query, filters: [\n    ['_access', 'in', $keys->values()['_access']],\n    ['_boundary', 'in', $keys->values()['_boundary']],\n]);\n","php","",[213,332,333,360,367,374,418,423,470,502,578,584,590,595,601,642,647,667,676,681,686,720,764,803],{"__ignoreMap":330},[334,335,338,342,346,350,353,355,357],"span",{"class":336,"line":337},"line",1,[334,339,341],{"class":340},"sbssI","use",[334,343,345],{"class":344},"sTEyZ"," Lomkit",[334,347,349],{"class":348},"sMK4o","\\",[334,351,352],{"class":344},"Access",[334,354,349],{"class":348},[334,356,352],{"class":344},[334,358,359],{"class":348},";\n",[334,361,363],{"class":336,"line":362},2,[334,364,366],{"emptyLinePlaceholder":365},true,"\n",[334,368,370],{"class":336,"line":369},3,[334,371,373],{"class":372},"sHwdD","\u002F\u002F Indexing: the rows of one model at a time\n",[334,375,377,380,383,386,390,393,397,400,403,406,409,412,415],{"class":336,"line":376},4,[334,378,379],{"class":348},"$",[334,381,382],{"class":344},"posts ",[334,384,385],{"class":348},"=",[334,387,389],{"class":388},"sBMFI"," Post",[334,391,392],{"class":348},"::",[334,394,396],{"class":395},"s2Zo4","query",[334,398,399],{"class":348},"()->",[334,401,402],{"class":395},"whereKey",[334,404,405],{"class":348},"($",[334,407,408],{"class":344},"ids",[334,410,411],{"class":348},")->",[334,413,414],{"class":395},"get",[334,416,417],{"class":348},"();\n",[334,419,421],{"class":336,"line":420},5,[334,422,366],{"emptyLinePlaceholder":365},[334,424,426,430,433,435,437,440,442,445,448,451,454,457,460,462,465,467],{"class":336,"line":425},6,[334,427,429],{"class":428},"s7zQu","foreach",[334,431,432],{"class":348}," (",[334,434,352],{"class":388},[334,436,392],{"class":348},[334,438,439],{"class":395},"indexKeysOf",[334,441,405],{"class":348},[334,443,444],{"class":344},"posts",[334,446,447],{"class":348},")",[334,449,450],{"class":348}," as",[334,452,453],{"class":348}," $",[334,455,456],{"class":344},"id ",[334,458,459],{"class":348},"=>",[334,461,453],{"class":348},[334,463,464],{"class":344},"keys",[334,466,447],{"class":348},[334,468,469],{"class":348}," {\n",[334,471,473,476,479,482,485,488,491,493,495,498,500],{"class":336,"line":472},7,[334,474,475],{"class":428},"    foreach",[334,477,478],{"class":348}," ($",[334,480,481],{"class":344},"chunks",[334,483,484],{"class":348},"[$",[334,486,487],{"class":344},"id",[334,489,490],{"class":348},"]",[334,492,450],{"class":348},[334,494,453],{"class":348},[334,496,497],{"class":344},"chunk",[334,499,447],{"class":348},[334,501,469],{"class":348},[334,503,505,508,511,514,517,520,522,525,528,532,535,538,540,542,545,547,549,551,554,556,559,561,563,565,567,569,571,573,575],{"class":336,"line":504},8,[334,506,507],{"class":348},"        $",[334,509,510],{"class":344},"index",[334,512,513],{"class":348},"->",[334,515,516],{"class":395},"upsert",[334,518,519],{"class":348},"([...$",[334,521,497],{"class":344},[334,523,524],{"class":348},",",[334,526,527],{"class":348}," '",[334,529,531],{"class":530},"sfazB","_access",[334,533,534],{"class":348},"'",[334,536,537],{"class":348}," =>",[334,539,453],{"class":348},[334,541,464],{"class":344},[334,543,544],{"class":348},"[",[334,546,534],{"class":348},[334,548,531],{"class":530},[334,550,534],{"class":348},[334,552,553],{"class":348},"],",[334,555,527],{"class":348},[334,557,558],{"class":530},"_boundary",[334,560,534],{"class":348},[334,562,537],{"class":348},[334,564,453],{"class":348},[334,566,464],{"class":344},[334,568,544],{"class":348},[334,570,534],{"class":348},[334,572,558],{"class":530},[334,574,534],{"class":348},[334,576,577],{"class":348},"]]);\n",[334,579,581],{"class":336,"line":580},9,[334,582,583],{"class":348},"    }\n",[334,585,587],{"class":336,"line":586},10,[334,588,589],{"class":348},"}\n",[334,591,593],{"class":336,"line":592},11,[334,594,366],{"emptyLinePlaceholder":365},[334,596,598],{"class":336,"line":597},12,[334,599,600],{"class":372},"\u002F\u002F Searching\n",[334,602,604,606,609,611,614,616,619,621,624,626,629,632,634,636,639],{"class":336,"line":603},13,[334,605,379],{"class":348},[334,607,608],{"class":344},"keys ",[334,610,385],{"class":348},[334,612,613],{"class":388}," Access",[334,615,392],{"class":348},[334,617,618],{"class":395},"indexReaderKeys",[334,620,405],{"class":348},[334,622,623],{"class":344},"request",[334,625,513],{"class":348},[334,627,628],{"class":395},"user",[334,630,631],{"class":348},"(),",[334,633,389],{"class":388},[334,635,392],{"class":348},[334,637,638],{"class":340},"class",[334,640,641],{"class":348},");\n",[334,643,645],{"class":336,"line":644},14,[334,646,366],{"emptyLinePlaceholder":365},[334,648,650,653,655,657,659,662,665],{"class":336,"line":649},15,[334,651,652],{"class":428},"if",[334,654,478],{"class":348},[334,656,464],{"class":344},[334,658,513],{"class":348},[334,660,661],{"class":395},"isClosed",[334,663,664],{"class":348},"())",[334,666,469],{"class":348},[334,668,670,673],{"class":336,"line":669},16,[334,671,672],{"class":428},"    return",[334,674,675],{"class":348}," [];\n",[334,677,679],{"class":336,"line":678},17,[334,680,589],{"class":348},[334,682,684],{"class":336,"line":683},18,[334,685,366],{"emptyLinePlaceholder":365},[334,687,689,691,694,696,698,700,702,705,707,709,711,714,717],{"class":336,"line":688},19,[334,690,379],{"class":348},[334,692,693],{"class":344},"hits ",[334,695,385],{"class":348},[334,697,453],{"class":348},[334,699,510],{"class":344},[334,701,513],{"class":348},[334,703,704],{"class":395},"search",[334,706,405],{"class":348},[334,708,396],{"class":344},[334,710,524],{"class":348},[334,712,713],{"class":388}," filters",[334,715,716],{"class":348},":",[334,718,719],{"class":348}," [\n",[334,721,723,726,728,730,732,734,736,739,741,743,745,747,749,752,755,757,759,761],{"class":336,"line":722},20,[334,724,725],{"class":348},"    [",[334,727,534],{"class":348},[334,729,531],{"class":530},[334,731,534],{"class":348},[334,733,524],{"class":348},[334,735,527],{"class":348},[334,737,738],{"class":530},"in",[334,740,534],{"class":348},[334,742,524],{"class":348},[334,744,453],{"class":348},[334,746,464],{"class":344},[334,748,513],{"class":348},[334,750,751],{"class":395},"values",[334,753,754],{"class":348},"()[",[334,756,534],{"class":348},[334,758,531],{"class":530},[334,760,534],{"class":348},[334,762,763],{"class":348},"]],\n",[334,765,767,769,771,773,775,777,779,781,783,785,787,789,791,793,795,797,799,801],{"class":336,"line":766},21,[334,768,725],{"class":348},[334,770,534],{"class":348},[334,772,558],{"class":530},[334,774,534],{"class":348},[334,776,524],{"class":348},[334,778,527],{"class":348},[334,780,738],{"class":530},[334,782,534],{"class":348},[334,784,524],{"class":348},[334,786,453],{"class":348},[334,788,464],{"class":344},[334,790,513],{"class":348},[334,792,751],{"class":395},[334,794,754],{"class":348},[334,796,534],{"class":348},[334,798,558],{"class":530},[334,800,534],{"class":348},[334,802,763],{"class":348},[334,804,806],{"class":336,"line":805},22,[334,807,808],{"class":348},"]);\n",[184,810,811,814,815,265,817,819],{},[213,812,813],{},"$index"," stands for the client of your engine. Declare ",[213,816,531],{},[213,818,558],{}," as arrays of strings that the engine filters on, compared as whole values.",[821,822,824],"h3",{"id":823},"indexkeysof",[213,825,826],{},"indexKeysOf()",[270,828,829,844,851],{},[273,830,831,832,835,836,839,840,843],{},"It takes the saved rows of one model, as a collection or any iterable, and returns, by the key of each row, ",[213,833,834],{},"['_access' => [...], '_boundary' => [...]]",". A string key written as a decimal integer, such as ",[213,837,838],{},"\"123\"",", comes back as the int ",[213,841,842],{},"123",", as in any PHP array.",[273,845,846,847,850],{},"It loads the ",[213,848,849],{},"load"," relations of the keys once for all the rows, and never loads lazily.",[273,852,853,854,857],{},"It throws ",[213,855,856],{},"InvalidIndexRowException"," for rows of two models, a value that is not a model, an unsaved, deleted or soft-deleted row, and a key that is not an int or a string.",[821,859,861],{"id":860},"indexreaderkeys",[213,862,863],{},"indexReaderKeys()",[270,865,866,889,908],{},[273,867,868,869,872,873,876,877,265,880,883,884,265,886,888],{},"It returns a ",[213,870,871],{},"Lomkit\\Access\\Search\\IndexReaderKeys",", with ",[213,874,875],{},"model()",", ",[213,878,879],{},"isClosed()",[213,881,882],{},"values()",", the values of ",[213,885,531],{},[213,887,558],{}," as two lists of strings.",[273,890,891,892,894,895,898,899,903,904,907],{},"The keys of the reader are the ones ",[213,893,322],{}," lists the rows with: for ",[213,896,897],{},"view",", in the current ",[231,900,902],{"href":901},"\u002Fessentials\u002Freaders#the-decision-context","decision context",". It takes no ability: one given after the model throws ",[213,905,906],{},"UnsearchableAbilityException",".",[273,909,910,911,914,915,918,919,923,924,926,927,930,931,933,934,907],{},"A reader that ",[213,912,913],{},"controlled()"," would show an empty page (no reader, no perimeter that allows them, no key, or a ",[213,916,917],{},"null"," boundary value) is ",[920,921,922],"strong",{},"closed",": ",[213,925,879],{}," is ",[213,928,929],{},"true",", and each field holds one value that no document carries, so a filter that ignores ",[213,932,879],{}," still finds nothing. Skip the engine when it is ",[213,935,929],{},[821,937,939],{"id":938},"matching","Matching",[184,941,942,943,945,946,949,950,907],{},"A document matches a reader when it shares at least one value with the reader in ",[213,944,531],{}," ",[920,947,948],{},"and"," at least one in ",[213,951,558],{},[270,953,954,963,969,976,982],{},[273,955,956,957,959,960,962],{},"Every open reader has values in both fields, and every document in ",[213,958,531],{},", so a filter on both fields is always right: an unrestricted reader holds the value that every document of the model carries, and a model without a boundary gives the same ",[213,961,558],{}," value to its documents and its readers.",[273,964,965,966,968],{},"The ",[213,967,558],{}," of a document is empty when its row has no boundary value: no reader finds it.",[273,970,971,972,975],{},"The values are digests of 32 lowercase hexadecimal characters. The morph class of the model is part of each digest, so one collection holds several models without a field of its own: the values of one model never match another model's. A model whose morph class names another model, as a child model of single table inheritance does, throws ",[213,973,974],{},"SharedMorphClassException",": give it a morph class of its own.",[273,977,978,979,981],{},"The values never match the documents of a ",[213,980,215],{}," model, even of the same model: never store or filter one kind with the other.",[273,983,984],{},"A change of the morph alias, or the rename of a class without one, changes every value: write the documents again.",[821,986,988],{"id":987},"requirements","Requirements",[184,990,991,992,994],{},"The model needs a control, not ",[213,993,215],{},". Both methods throw:",[270,996,997,1003,1013,1023],{},[273,998,999,1002],{},[213,1000,1001],{},"MissingControlException"," without a control;",[273,1004,1005,1008,1009,1012],{},[213,1006,1007],{},"UnsearchableBoundaryException"," when the boundary class has no ",[213,1010,1011],{},"searchKeys()",";",[273,1014,1015,1018,1019,1022],{},[213,1016,1017],{},"PerimeterWithoutSearchKeysException"," when a perimeter that is neither unrestricted nor a ",[213,1020,1021],{},"ThroughParent"," declares no search keys, in the control or in the control of a parent, since the rows it grants would be missing from the index;",[273,1024,1025,1028,1029,1031,1032,1034,1035,1038,1039,907],{},[213,1026,1027],{},"UnsearchableThroughParentException"," for a ",[213,1030,1021],{}," that delegates ",[213,1033,897],{}," to another ability of the parent, or whose parent has a boundary without a search form. The relation needs no ",[213,1036,1037],{},"inverse"," on a model that is not ",[213,1040,215],{},[184,1042,1043,1045,1046,1052],{},[213,1044,124],{}," does not check a model indexed only by your own pipeline: call both methods in a test, as ",[231,1047,1049],{"href":1048},"\u002Ftesting-and-tooling\u002Ftesting#an-index-of-your-own",[213,1050,1051],{},"assertIndexKeysAgree()"," does.",[821,1054,1056],{"id":1055},"freshness","Freshness",[184,1058,1059],{},"The package reindexes nothing outside Scout. A document keeps the values it was written with, and a stale value can show a row to a reader who lost access until the document is written again. Compute the values again and rewrite the documents when what the keys read changes:",[270,1061,1062,1071,1081],{},[273,1063,1064,1065,1068,1069,1012],{},"the columns that the ",[213,1066,1067],{},"row"," callbacks and the boundary read, and the models they load through ",[213,1070,849],{},[273,1072,1073,1074,1077,1078,1080],{},"the models that a ",[213,1075,1076],{},"reindexWhen()"," watches, the parent of a ",[213,1079,1021],{}," and what changes its keys, and the pivots that a key reads;",[273,1082,1083],{},"the rules themselves, after a deployment, and the writes that Eloquent does not see.",[184,1085,1086,1087,1089,1090,1092],{},"Delete the documents of a row when it is deleted or soft deleted, and write them again when it is restored; a parent deleted or restored changes the keys of its children. ",[231,1088,84],{"href":85}," lists what the package does for a Scout model in each case: your pipeline does the same for its index. The reader side needs nothing, since ",[213,1091,863],{}," computes the keys at each call.",[1094,1095,1096],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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);}",{"title":330,"searchDepth":337,"depth":362,"links":1098},[1099,1100],{"id":181,"depth":362,"text":182},{"id":298,"depth":362,"text":299,"children":1101},[1102,1103,1104,1105,1106],{"id":823,"depth":369,"text":826},{"id":860,"depth":369,"text":863},{"id":938,"depth":369,"text":939},{"id":987,"depth":369,"text":988},{"id":1055,"depth":369,"text":1056},"Keep the access filter when you query the search engine with your own client, or feed your own index with Access::indexKeysOf() and Access::indexReaderKeys().","md",null,{},{"title":100,"description":1107},{"loc":101,"lastmod":1113},"2026-11-21T16:10:34+01:00","rUTpwTojQs9SUo2T5RAIFMT8H3CjQ850Ij5Hl295aC8",[1116,1118],{"title":96,"path":97,"stem":98,"description":1117,"children":-1},"Let a front end search Meilisearch, Typesense or Algolia with a signed token that holds the reader's filter, or through an application route that guards it.",{"title":110,"path":111,"stem":112,"description":1119,"children":-1},"With laravel-rest-api 3.6+, AccessControlExtension applies your controls to every resource of a controlled model, its text searches and row checks included.",1795277181678]