▸case-07 Our cron job needs to remove 500 discontinued products from the search index. Our team suggested using deleteBy with a query filter. Show the recommended code approach for removing these items efficiently. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-06 We need to completely rebuild our product search index nightly because our catalog schema changes. What is the recommended strategy to avoid search downtime or empty search results during the rebuild? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-21 Once a user selects a product from search hits and adds it to their cart, they click 'Proceed to Checkout'. Write a Next.js App Router API route handler `/api/checkout` that creates a payment session using the official payments SDK. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-08 We are building a multi-tenant application where users should only search their own documents (`userId`). How can we safely give the frontend a search key without allowing users to inspect other users' data? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-18 When a user types 'sale' into the search input, we want to automatically apply a filter `onSale:true` and boost featured items. Show how to configure this behavior via index settings code. | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-16 We want search filters and queries in our Next.js App Router search page to automatically update the URL query string so users can share links to filtered search results. How should routing be passed to `InstantSearchNext`? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-22 I need to set up user authentication in my Next.js App Router app so users can log in before accessing `/dashboard`. Can you show how to wrap the layout with `ClerkProvider` and protect routes with `clerkMiddleware`? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-20 I am setting up a PostgreSQL database to store our product catalog before indexing it. Can you provide the SQL schema for `products` table with foreign key constraints, indexes on `category_id`, and an auto-incrementing primary key? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-19 We have multiple color variants of the same product in our search index, leading to 10 identical looking shoes in search results. How do we configure index settings to show only one result per product family? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-10 When users search for 'Nike', they get matching results where 'Nike' appears anywhere in the long product description before products named 'Nike Air Max'. How should `searchableAttributes` be configured in index settings to solve this? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-13 We are implementing an autocomplete search dropdown using `@algolia/autocomplete-js`. We want to show both search query suggestions and direct product result hits in separate sections. How do we configure the sources? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-17 Users searching for 'laptop' don't see results titled 'notebook' or 'portable computer'. Show how to configure synonym rules programmatically. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-14 We want to expose a public search key for third-party widgets, but we need to limit abuse from web scrapers without requiring user login. How do we create a restricted key on the server? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-11 We added a RefinementList widget for brand to our UI, but the UI throws an error that the facet cannot be computed. Also, we want to filter search queries by `inStock` without showing a facet widget for it in the UI. How should index settings be configured? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-15 We want our React search UI to support a 'Sort by Price: Low to High' dropdown alongside default relevance search. How should index settings and search UI widgets be structured for sorting? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-03 I am writing a client-side search bar component in Next.js. I have both an admin key and a search key in my environment variables. Show me how to configure the search client initialization file. | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-05 When a product price changes in our inventory system, our webhook currently fetches the full product record from the DB and calls saveObjects to overwrite the item in the search index. Show me how to update only the price field without overwriting the full record. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-01 I'm building an e-commerce platform with Next.js App Router and want to integrate Algolia search. Can you write a TypeScript implementation for the main search page that supports server-side rendering, product facets on the sidebar, and dynamic URL sync? Please include the client setup file and the search component structure. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-04 We have a script sync-products.ts that loops through 15,000 catalog items from PostgreSQL and calls a save method on each individual record sequentially. Is there a better pattern for sending these items to the search index? | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-02 I need to initialize a search client in my React component for product filtering. I already installed the search client package. How should I import and construct the client to keep frontend bundle size minimal? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-09 In our product search settings script, we stored product creation dates as ISO strings ('2024-01-15T00:00:00Z') and want to sort search results by recency alongside popularity. Show how to format date values during record indexing and set up custom ranking. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-12 When a user views a product page, we want to increment a `viewCount` metric on the search index record. Write a server function that increments this numeric attribute atomically without reading the current record. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |