v2.12.0
Scoped search keys that expire
Create short lived search keys on your server that only see one customer's documents, without a request to ZeroIndex.
Scoped keys are signed on your server from a parent search key, so creating one costs nothing and works offline. Each one can be limited to some indexes, carry a filter that is added to every query, and expire after up to 30 days.
const key = client.keys.createScoped({
parent: process.env.ZEROINDEX_SEARCH_KEY,
indexes: ["tickets"],
filter: "account_id = 4821",
expiresIn: "1h",
});Send the key to the browser and search straight from there. A user can change the query, but never the filter. More in Authentication.
Added
createScopedin the JavaScript, Python, Go and Ruby SDKs.expiresInfor scoped keys, from one minute to 30 days.
Changed
- Revoking a parent key now revokes every scoped key made from it.