> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search patterns

> Full-text search, vector search, filter UIs, and when to use which.

Three kinds of "search":

<CardGroup cols={3}>
  <Card title="Filter" icon="filter">
    Narrow a known set by exact-match criteria. "Show me tasks assigned to me with status open." Use indexed Convex queries.
  </Card>

  <Card title="Full-text" icon="text-search">
    Find by keyword in text fields. "Tasks containing 'Q2 report'." Use [Convex full-text search](/convex/full-text-search).
  </Card>

  <Card title="Semantic / vector" icon="brain">
    Find by meaning, not exact words. "Tasks about end-of-quarter reporting." Use [Convex vector search](/convex/vector-search).
  </Card>
</CardGroup>

## Decision tree

<Steps>
  <Step title="Are you matching exact values? (status = open, assignee = me)">
    Filter. Indexed `where` clauses.
  </Step>

  <Step title="Are you matching keywords in text? (titles, body, descriptions)">
    Full-text search.
  </Step>

  <Step title="Do you want results that are conceptually related, not just keyword-matched?">
    Vector search (with embeddings).
  </Step>
</Steps>

## Combining

Many UIs combine all three:

* A search bar (full-text on `title` + `body`)
* Filter pills (filter by status, assignee, priority)
* An "Ask in natural language" mode (vector search for conceptual queries)

## Filter UI patterns

<CardGroup cols={2}>
  <Card title="Pill filters" icon="circle">
    Click pills to toggle filters. Active filters visible as chips above the list.
  </Card>

  <Card title="Sidebar filters" icon="sidebar">
    Persistent filter panel. Best for data-heavy UIs (admin, analytics).
  </Card>

  <Card title="Inline command" icon="terminal">
    A cmdk-style command bar. Power-user feel; takes practice.
  </Card>

  <Card title="URL query params" icon="link">
    Persist filter state in the URL so it survives refresh and is shareable.
  </Card>
</CardGroup>

## Tips

<Tip>
  **Start with filter, add search later.** Most "search" requests are really filter requests in disguise.
</Tip>

<Tip>
  **Debounce search inputs.** 200ms is plenty. Avoids hammering the backend on every keystroke.
</Tip>

## Related

<CardGroup cols={3}>
  <Card title="Full-text search" icon="text-search" href="/convex/full-text-search">
    Convex implementation.
  </Card>

  <Card title="Vector search" icon="brain" href="/convex/vector-search">
    Semantic implementation.
  </Card>

  <Card title="Algolia" icon="search" href="/integrations/algolia">
    Hosted search alternative.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.