> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parsaa.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Semantic Code Search

> Let Parsaa find code by meaning using a local hybrid index

## Overview

Parsaa can search your project by **meaning**, not just exact text. When **Code Indexing** is enabled, the agent's `semantic_search` tool retrieves the most relevant code for a request — even when your wording doesn't match the identifiers in the source.

<Info>
  This isn't a separate search box you open with a shortcut. Code Indexing powers retrieval that the agent uses automatically while it works. Searching for "authentication flow" surfaces login logic, token refresh, and session management even if those exact words never appear.
</Info>

## How It Works

<Steps>
  <Step title="Enable Code Indexing">
    Turn on indexing for the project in **Settings → Project → Code Indexing**.
  </Step>

  <Step title="Parsaa builds a hybrid index">
    Your code is chunked and embedded, then stored in a local index that combines vector similarity with full-text (FTS5) search for the best of both — meaning and exact matches.
  </Step>

  <Step title="The index stays on your Mac">
    The vector + FTS index lives locally under Parsaa's application support directory. It is per-project and updates as your code changes.
  </Step>

  <Step title="The agent retrieves on demand">
    When a request benefits from broader context, the agent calls `semantic_search` against the index and pulls in the top matches automatically.
  </Step>
</Steps>

## Setup

<Steps>
  <Step title="Open Code Indexing settings">
    Go to **Settings → Project → Code Indexing**.
  </Step>

  <Step title="Enable indexing for the project">
    Toggle indexing on. The initial pass runs once; later updates are incremental. A pill indicator shows indexing progress.
  </Step>
</Steps>

<Note>
  Embeddings are generated through Parsaa's backend pipeline — you don't need a separate embeddings API key. The resulting index is stored locally on your Mac.
</Note>

## What It's Good For

<AccordionGroup>
  <Accordion title="Architecture & flow">
    * "authentication flow"
    * "how data gets saved to Core Data"
    * "navigation between screens"
    * "dependency injection setup"
  </Accordion>

  <Accordion title="Specific patterns">
    * "network error handling"
    * "SwiftUI views that display user data"
    * "async/await usage in the networking layer"
    * "custom view modifiers"
  </Accordion>

  <Accordion title="Business logic">
    * "payment processing"
    * "user session management"
    * "push notification handling"
  </Accordion>
</AccordionGroup>

## Privacy

<CardGroup cols={2}>
  <Card title="Local index" icon="hard-drive">
    The vector + FTS index is stored on your Mac, per project. It is not uploaded to Parsaa's servers.
  </Card>

  <Card title="You control retention" icon="shield-halved">
    In Private Mode nothing is retained past the request. Training Mode adds a "Store Codebases" toggle you can leave off. See [Privacy & Data](/configuration/privacy-and-data).
  </Card>
</CardGroup>
