Skip to content

Explore query suggestions and exact-first search

The explore-semantic-search PostHog flag enables suggestions and exact-first search for the authenticated user. Brisket checks the flag on the server. A missing, false or failed flag evaluation retains existing search.

Typing requests up to eight positive suggestions after 300 ms. Enter or selecting a suggestion submits the search. Suggestions and exact results share the query resolver and current catalogue filters. Counts stay on the server. Existing mode, age and subscription gates remain in effect.

On mobile, Search opens a full-screen dialog. Empty input shows removable Recent searches. Typing replaces Recent with suggestions; Enter or selecting a suggestion keeps results on the same screen and dismisses the keyboard. Ordering, content mode, and media type filters sit above the results; subcategories stay on Explore. The input, filters, results and selection actions scroll together without pinned controls. Editing the query returns to suggestions, clearing returns to Recent, and Cancel exits Search and clears the query. Reopening starts at Recent, where the last submitted search is retained. The feed’s virtualized grid and pagination use the dialog’s scroll viewport rather than the background page. Sources: search screen, screen filters and feed integration.

Search returns at most 500 results: exact tag matches first, then distinct similar results from the existing embedding search. Top/Newest orders exact matches; vector distance orders the remainder. Exact-only pages do not call the embedding provider. Current Sirloin publication, access and semantic evidence checks apply to each request. Changes only in Brain appear after catalogue synchronization.

Every page resolves the current map. An edit during pagination can change query meaning, duplicate a result or skip one. There is no revision history or frozen search context. With an unchanged map and catalogue, pagination keeps a stable order, including equal vector distances.

Open Explore query map in Fennec. Add or edit a query, choose ANY or ALL, and select canonical tags. The shared resolver validates the bounded document against the producer’s vocabulary. Migration 187 seeds 1,961 mappings in one singleton table. This layer does not enable public Explore search. Save validates the document and writes an audit entry in the same transaction. A conflicting revision preserves the draft and requires reload before another save. Revisions cross HTTP as decimal strings.

The editor uses the existing Sirloin admin HTTP listener, Clerk authentication, ADMIN/ROOT roles, CharacterAdminEnabled setting and allowed-origin configuration. Its GET/PATCH route is /internal/explore-query-map/v1. Enablement of the consumer flag does not enable the editor listener. Verify the deployed editor identity and origin before handoff.

  1. Deploy media tagging and qualify catalogue tag coverage through DISCO-68.
  2. Apply migration 188 and deploy Sirloin, then Fennec and Brisket with the new consumer flag off. Prompt capture and prompt analysis are not dependencies.
  3. Enable the flag for staff. Check positive suggestions with media/mode filters, combined and unknown queries, exact-to-similar pagination, and an editor save plus stale-save rejection. Check the other-mode gate and clear-search behavior.
  4. Compare relevance against judged queries on the deployed, qualified catalogue. Synthetic SQL timings and local fixture tests do not establish relevance or hosted latency. Release only after these checks pass.

Before updating an existing preview, inspect its migration ledger and schema. The earlier chain used 174 for media tagging and 175 for the query map, but main uses 174 for Primer. A preview with the map recorded as 175 and no media tables needs a separately authorized repair before deploying this chain. Renaming the files alone does not repair that database. Preserve map edits and audit history.

Disable explore-semantic-search to restore the existing search path. Keep the query-map table and audit history. This flag does not change producer enrollment, provider configuration, or the separate embedding-version rollout flags.