// Add to multiple indexes
await memory.add("User likes spicy food", "alice", { indexName: "food_preferences" });
await memory.add("User has high blood pressure", "alice", { indexName: "health_info" });
await memory.add("User works night shifts", "alice", { indexName: "work_info" });
// Search across different indexes
const foodResults = await memory.search("preferences", "alice", { indexName: "food_preferences" });
const healthResults = await memory.search("medical", "alice", { indexName: "health_info" });
const workResults = await memory.search("schedule", "alice", { indexName: "work_info" });
console.log(`Food preferences: ${foodResults.results.length}`);
console.log(`Health info: ${healthResults.results.length}`);
console.log(`Work info: ${workResults.results.length}`);